div tag in html5

Kishon
Posted by Kishon under HTML 5 category on | Points: 40 | Views : 1484
The HTML 5 specification has introduced a number of new elements that can (and should) be used instead of the <div> element. Examples of these new elements include <article>, <aside>, <header>, and <footer>, as well as others.

Therefore, the <div> element should generally be used as an extension mechanism which is used only if there isn't another suitable HTML element to use.

<article>
<header>
<h1>The Blog Entry Title</h1>
<p>12/25/2045</p>
</header>
<p>Blog entry</p>
<p>...</p>
<section>
<h1>Comments</h1>
<article>
<footer>
<p>Posted by: <span>Name of person</span></p>
<p>Time: 15 minutes ago</p>
</footer>
<p>Comment text here
/p>
</article>
<article>
<footer>
<p>Posted by: <span>Name of person</span></p>
<p>Time: 25 minutes ago</p>
</footer>
<p>Another comment here</p>
</article>
</section>
</article>

Comments or Responses

Posted by: T.Saravanan on: 9/19/2012 Level:Silver | Status: [Member] [MVP] | Points: 10
Hi,

Nice info. Please post your code inside the code tag.

Login to post response