Section: Compared with the semantic deficiency of div, simply speaking, section is a semantic div, but don't think it's really that simple. A section represents a theme and usually has a title. Typical scenarios of section application include chapters of articles, tabs in tab dialog boxes or numbered parts of papers. The homepage of a website can be divided into introduction, news and contact information. Part is not just an ordinary container label. Div should be used when the tag is only used for style or convenient script use. Generally speaking, section applies when the content of an element clearly appears in the document outline.
& lt articles & gt
& lthgroup & gt
& lth 1 & gt; Apple & lt/h1>
& lth2 & gt Is it delicious? Does it taste good? Fruit! & lt/H2 & gt;
& lt/h group & gt;
& ltp> that one? Apple? Is it? That? pomaceous? Fruit? Yes? That? Apple? Trees. & lt/p & gt;
& ltsection & gt
& lth 1 & gt; Red? Delicious & lt/h1>
& ltp> These? Bright? Red? Apple? Is it? That? Most? Common? Found? Are you online? many
Supermarkets. & lt/p & gt;
& lt/section & gt;
& ltsection & gt
& lth 1 & gt; Grandma? Smith & lt/h1>
& ltp> These? Is it juicy? Green? Apple? Manufacturing? Answer? Great? Fill? for
Apple? Pie. & lt/p & gt;
& lt/section & gt;
& lt/article & gt; Article: This is a special section tag with clearer semantics than section, which represents an independent and complete related content block. Generally speaking,
The article will have a title section (usually included in the header) and sometimes a footer. Although partly
It is also a thematic content, but the article itself is independent and complete in structure and content. When an article is embedded in an article, in principle, the content of the inner article is related to the content of the outer article. For example, in a blog post, articles containing comments submitted by users should abscond from articles containing blog posts.
& lt articles & gt
& lt title & gt
& lth 1 & gt; That? Very? First of all? Rules? Yes? Life & lt/h1>
& ltp>& lt time? pubdate? datetime = " 2009- 10-09t 14:28-08:00 " >& lt/time & gt; & lt/p & gt;
& lt/header & gt;
& ltp> What if? Really? Answer? Microphone? Anywhere? Nearby? What about you? Hypothetically? Is it? Is it hot? and
Send? Whatever. You are. Say what? Where to? That? The world. ? Seriously. & lt/p & gt;
& ltp & gt...& lt/p & gt;
& ltsection & gt
& lth 1 & gt; Comment & lt/h1>
& lt articles & gt
& lt Footer & gt
& ltp> Post Bar? Author:? George? Washington
;& ltp>& lt time? pubdate? datetime = " 2009- 10- 10t 19: 10-08:00 " >& lt/time & gt; & lt/p & gt;
& lt/footer & gt;
& ltp> Yeah! ? Especially? What time? Talk? About what? Yours Lobbyist? Friends! & lt/p & gt;
& lt/article & gt;
& lt articles & gt
& lt Footer & gt
& ltp> Post Bar? Author:? George? Hammond
;& ltp>& lt time? pubdate? datetime = " 2009- 10- 10t 19: 15-08:00 " >& lt/time & gt; & lt/p & gt;
& lt/footer & gt;
& ltp> Hey? What about you? Really? That? Same? First of all? Name? As? Me. & lt/p & gt;
& lt/article & gt;
& lt/section & gt;
& lt/article & gt; Summary: the semantics of the div section articles are from scratch and gradually enhanced. discrepancy
Without any semantics, it is only used for style and applies to a theme content.
Part, if this content can be taken out of context as a complete and independent content, the article applies. In principle, you can use article.
Section is ok, but in fact, if it is more appropriate to use article, then don't use Section. Navigation and side
The same is true for the use of, these two tags are also special sections, so don't use section when nav and side are more suitable.
The difference between div and section, article and other tags is relatively simple. For parts and articles
At first glance, it's hard to tell. In fact, the key point is to see whether this content can still exist as a complete and independent content without the whole. The key point here is integrity. Because actually,
The content contained in section can also be counted as an independent block, but it can only be regarded as a part of the whole, and article is a complete whole.