Monday 12 November 2012

HMTL 5, CSS3 and JavaScript for Windows 8 – The magic of the <SECTION> and <ARTICLE> tags in HTML 5.

<Section>:
There is a new kid on the block in HTML5, and that is called <Section>. The <Section> tag has been introduced to make the life easier to the web developers. It is basically a notation, but a really useful and powerful one, especially if it is combined withe the <Article> tag.

The <Section> tag defines sections in a document. Such as chapters, headers, footers, or any other sections of the document. One of the best things about the <Section> Tag, it is the fact it supports all the Globals Attributes in HTML and of course the Event Attributes.

So this:
<section>
  <h6>WWF's Panda symbol</h6>
  <p>The Panda has become the symbol of WWF. The well-known panda logo of WWF originated from a panda named Chi Chi that was transferred from the Beijing Zoo to the London Zoo in the same year of the establishment of WWF.</p>
</section>

It will generate:

WWF's Panda symbol

The Panda has become the symbol of WWF. The well-known panda logo of WWF originated from a panda named Chi Chi that was transferred from the Beijing Zoo to the London Zoo in the same year of the establishment of WWF.

<Article>:
The <Article> tag is much more independent than the section one,self-contained content. An article normally comes embedded into a section.

An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.

Potential sources for the <article> element:

  • Forum post
  • Blog post
  • News story
  • Comment

So this:
<article>
  <h1>Internet Explorer 9</h1>
  <p>Windows Internet Explorer 9 (abbreviated as IE9) was released to
  the  public on March 14, 2011 at 21:00 PDT.....</p>
</article>

It will generate:

Internet Explorer 9

Windows Internet Explorer 9 (abbreviated as IE9) was released to the public on March 14, 2011 at 21:00 PDT.....