Sections and Outlines of an HTML5 Document #Introduction to HTML 5

Just some notes

  • In HTML 4, the sections are not precise with tags like div unless you assign some styles to them. For defining sections, you do not need div tags but header tags (h1..h6) can imply sections. HTML4 is very imprecise on what a section is and what is it’s scope.
  • In HTML5, section tag explicitly defines a section
  • In HTML5, tags such as h1, h2,…h6 are relative to the current section not relative to the whole page
  • article, section, nav and aside are always subsections to their nearest sections; they are not dependent on header tags
  • In HTML 4, everything belongs to the main outline of the web-page. In HTML5, aside does not belong to the main outline. Can be used for advertising blocks
  • In HTML5, nav, header, footer do not belong to the content but to the whole site
  • In non-HTML5 browsers, we can support the HTML5 tags just by defining styles as below for them.
    section, article, aside, footer, header, nav, hgroup {  display:block;}
  • IE8 and earlier does not support styling of unsupported tags. So the above method will not work in IE
  • So we can create these elements for such browsers
    //{ and } are used instead of < and >{!--[if lt IE 9] }  {script}    document.createElement("header" );    document.createElement("footer" );    document.createElement("section");    document.createElement("aside"  );    document.createElement("nav"    );    document.createElement("article");    document.createElement("hgroup" );     document.createElement("time"   );  {/script}< ![endif]-->

From: http://sitestree.com/?p=5332
Categories:Introduction to HTML 5
Tags:
Post Data:2008-03-02 23:21:02

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada