New semantic structure of HTML5 for all future websites

Written on 23-Apr-2009 | Coding practices | No Comments

This is a quick update on what coding practices i will be using for future projects. I will be using the new semantic structure of HTML5 for all future websites I create (whenever possible). What this basically means is that any code created using the new HTML5 mark-up will be cleaner and more structured, than HTML4, for example, in current practice, a structured page would consist of a container, header, body, content, and footer and be laid out like:

<div id=”wrapper”>
<div id=”header”></div>
<div id=”nav”></div>
<div id=”content”>
<div class=”container”></div>
<div class=”container”></div>
<div class=”container”></div>
</div>
<div id=”footer”></div>
</div>

and with the new HTML5 it would be layed out instead like:

<header></header>
<nav></nav>
<section>
<article></article>
<article></article>
<article></article>
</section>
<footer></footer>

See how clean and easy to follow HTML5 is compared to HTML4, this will also put your code ahead of the game. You can read more about HTML5 by visit orderedlist.com/articles/structural-tags-in-html5.

Leave a Reply