most In the near group to carry on the HTML5 label's study, the method is everybody chooses several labels, oneself first to study, then gives the explanation to everybody. This process is still very rewarding. But now HTML5 is still in the draft stage, and some of the new labeling elements are often explained, Even the label to move out is also very frequent (such as Hgroup), while the existing large Web portal in the use of HTML5 also have no good examples can be consulted, so that everyone's learning process more groping. Here is an article I saw in the html5doctor above, at present everybody ignorant stage, Perhaps it would be easier to read the master's explanation. As a result of Caishuxueqian, many do not understand the place may just do a literal translation, the wrong place also ask everyone to advise.
In this article I will share with you the small errors and bad practices of the HTML5 build page, and let us avoid these errors in future work.
Don't put
Define styles as simple containers
One of the mistakes we often see is to arbitrarily
Labels are substituted with labels, especially as containers that surround them. In XHTML or HTML4, we will see code similar to the following:
01
<div id= "wrapper" >
<div id= "Header" >
05
Div>
<div id= "Main" >
08
Div>
Ten <div id= "secondary" >
11
Div>
<div id= "Footer" >
14
Div>
Div>
Now I see the following code look:
01
<section id= "wrapper" >
Geneva 05
Header>
<section id= "Main" >
08
Section>
Ten <section id= "secondary" >
11
Section>
<footer>
14
Footer>
Section>
Intuitively, the above example is wrong: not a container. Elements are semantic sections that help build a document outline. It should contain a caption. If you are looking for an element that can contain a page (whether HTML or XHTML), it is common practice to define the style directly to the tag, as Kroc Camen describes it, and if you need additional elements to define the style, use, as Dr Mike explains, the div is not extinct, If there are no more suitable, div may be your most appropriate choice. Remember this, here we have revised the example above, by using two new characters. (Whether you need extra depends on your design.)
Detailed Description: http://html5.662p.com/thread-47-1-1.html
Common misconceptions about the use of inventory HTML5 tags