arfserra / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

HTML Sections #2

Open martoio opened 7 years ago

martoio commented 7 years ago

Good job on separating the HTML into sections! One thing you might want to consider is changing the <div> into a <section> to improve the semantics of your code. If you aren't familiar with semantic HTML: http://www.hongkiat.com/blog/html-5-semantics/ Example:

<!-- First section -->
<section> <!-- or <div>, but <section> is more semantic -->
  <h2 class="brushes">Brushes</h2>
  <img src="#" alt="#" />
  <h3>Text</h3>
  <p>
    Lorem <span class="price">ipsum</span>
  </p>
</section>

(In the same way, instead of <div class="header">, you can use <header>)

arfserra commented 7 years ago

Hi Martin! I didn't know about the other semantic tags besides nav. Can I assign classes and ids to them as well or would that be unecessary? Thanks!

martoio commented 7 years ago

They are just like all the other elements you are used to. Only difference is that they are supposed to carry more meaning with them. Search engines supposedly utilize the semantics of elements to improve indexing for pages (ie, using these elements is a cheap and easy way to boost your SEO). Of course, that's a bit beyond the scope of getting to grips with HTML, but it's good to be aware of it.

For more info on elements you can use: https://www.w3schools.com/html/html5_semantic_elements.asp