[size=small]HTML5规范带来了一些新的元素,Web开发人员,让他们描述一个Web文件与标准的语义结构。本文档介绍了这些元素,以及如何使用它们来定义所需的任何文件大纲。
一个文件的结构,即,语义结构是什么在<BODY> </BODY>之间,呈现给用户的页面的基础。HTML4中使用的部分和子部分为一个文件,它的结构描述的概念。A段被定义为一个HTML HTML标题元素(<H1> <H2>,<H3> <H4> <H5>或<H6>),在它分割(<DIV>)元素,定义其标题。这些HTML分水岭和HTML标题元素之间的关系导致的文件的结构和它的轮廓。[/size]
[size=small]所以下面的标记[/size]:
导致以下的轮廓:
[quote]1. Forest elephants
1.1 Habitat[/quote]
[size=small]不是强制性的的<div>元素定义一个新的部分。HTML标题元素仅仅存在意味着一个新的部分是不够的。因此,[/size]
导致以下的轮廓:
[quote]1. Forest elephants
1.1 Habitat
1.2 Diet
2. Mongolian gerbils[/quote]
一个文件的结构,即,语义结构是什么在<BODY> </BODY>之间,呈现给用户的页面的基础。HTML4中使用的部分和子部分为一个文件,它的结构描述的概念。A段被定义为一个HTML HTML标题元素(<H1> <H2>,<H3> <H4> <H5>或<H6>),在它分割(<DIV>)元素,定义其标题。这些HTML分水岭和HTML标题元素之间的关系导致的文件的结构和它的轮廓。[/size]
[size=small]所以下面的标记[/size]:
<div class="section" id="forest-elephants" >
<h1>Forest elephants</h1>
<p>In this section, we discuss the lesser known forest elephants.
...this section continues...
<div class="subsection" id="forest-habitat" >
<h2>Habitat</h2>
<p>Forest elephants do not live in trees but among them.
...this subsection continues...
</div>
</div>
导致以下的轮廓:
[quote]1. Forest elephants
1.1 Habitat[/quote]
[size=small]不是强制性的的<div>元素定义一个新的部分。HTML标题元素仅仅存在意味着一个新的部分是不够的。因此,[/size]
<h1>Forest elephants</h1>
<p>In this section, we discuss the lesser known forest elephants.
...this section continues...
<h2>Habitat</h2>
<p>Forest elephants do not live in trees but among them.
...this subsection continues...
<h2>Diet</h2>
<h1>Mongolian gerbils</h1>
导致以下的轮廓:
[quote]1. Forest elephants
1.1 Habitat
1.2 Diet
2. Mongolian gerbils[/quote]