Maintaining clean and organised code is a vital part of being a developer. Today, we're going to be learning about two methodologies that can help you do this – semantic HTML and BEMCSS.
-
Pick a partner and pair up
-
Clone this repo to one of your laptops – you'll be using the other laptop for research
-
Open the repo in Atom
Have a look at the code in index.html
together. We're going to be refactoring it to make it more
semantic.
-
The code isn't very readable as it is – make sure that it's properly indented.
-
Make sure you both understand what semantic HTML is and why we use it. Take a look at this article to get you started on the right path.
-
Use what you've learned to cure
index.html
of its divitis.
Our code might be looking good now, but the site looks a bit dull. Time to get our CSS on! We want to make sure our code stays organised, though, so we're going to be writing BEMCSS.
-
Go here and read through the documentation for BEM.
-
Write your CSS in
style.css
. Feel free to style the page how you like – just make sure you use BEMCSS (HINT: this will involve changing the IDs given to you inindex.html
!)