H5新增语义化标签
< header > 头部标签
< nav > 导航标签
< article >:内容标签
< section >:块级标签
< aside >:侧边栏标签
< footer >:尾部标签
注意:
这种语义化标准针对搜索引擎的
这些新标签可以在页面中多次使用
在 IE9中,需要把这些元素转化为块级元素
移动端更实用
案例:
header,
nav {
height: 120px;
background-color: aquamarine;
margin-top: 10px;
}
section {
background-color: bisque;
}
article {
width: 49%;
height: 200px;
background-color: aquamarine;
margin-top: 10px;
float: left;
}
aside {
width: 49%;
height: 200px;
background-color: aquamarine;
margin-top: 10px;
float: left;
margin-left: 2%;
}
.clear {
clear: both;
}
footer {
height: 120px;
margin-top: 10px;
background-color: aquamarine;
}
<body>
<header> header </header>
<nav> nav </nav>
<article> article
<section> section </section>
</article>
<aside> aside </aside>
<div class="clear"></div>
<footer> footer </footer>
</body>