markthedesigner / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

Using HTML5 Element tags #1

Open zannain opened 6 years ago

zannain commented 6 years ago

HTML5 introduced a lot of new elements that make more "semantic" sense as opposed to the traditional method of using <div> element tags everywhere to group elements and sections of web-page together. Using these elements optimizes a webpage to be found by search engine algorithms. HTML5 introduced elements such as <section>, <nav> and <footer>. I recommend checking out this list of other elements introduced with HTML5. This ensures you are writing HTML5 markup that matches the latest specification .

The screenshot below illustrates the increase in code readability when you combine using the section with the div tag

<section>
  <div>
      <h1></h1>
      <p></p>
  </div>
  <div>
      <h1></h1>
      <p></p>
  </div>
</section>

<div>
  <div>
    <h1></h1>
    <p></p>
   </div>
   <div>
     <h1></h1>
     <p></p>
    </div>
</div>