在之前的HTML页面中,大家基本上都是用了Div+CSS的布局方式。 而搜索引擎去抓取页面的内容的时候,它只能猜测你的某个Div内的内容是文章内容容器,或者是导航模块的容器,或者是作者介绍的容器等等 。也就是说整个HTML文档结构定义不清晰,HTML5中为了解决这个问题,专门添加了:页眉、页脚、导航、文章内容等跟结构相关的结构元素标签。
标签,定义文档中的节。比如章节、页眉、页脚或文档中的其它部分。一般用于成节的内容,会在文档流中开始一个新的节。它用来表现普通的文档内容或应用区块,通常由内容及其标题组成。但section元素标签并非一个普通的容器元素,它表示一段专题性的内容,一般会带有标题。 section元素用于对网站或应用程序中页面上的内容进行分块。一个section元素通常由内容及其标题组成。但section元素并非一个普通的容器元素;当一个内容需要被直接定义样式或通过脚本定义行为时,推荐使用div而非section元素。section元素中的内容可以单独存储到数据库中或输出到word文档中。
注意他和div section 应用的典型场景有文章的章节、标签对话框中的标签页、或者论文中有编号的部分。 通常不推荐为那些没有标题的内容使用section元素 组合网页或区段的标题,修改hgroup样式后,被他包围的h1、h4之类的标题元素就会同时继承他设置的样式。
标签用于对网页或区段(section)的标题进行组合。
HTML5中的新元素标签
这是我自己的section测试
The People’s Republic of China was born in 1949…
Welcome to my WWF
For a living planet
Welcome to my homepage
My name is Donald Duck