难道不是<header>
?HTML 5没有主页<header>?
我有这个基本结构,但我正在考虑封装一个标头,围绕正文开始和内容之间的所有内容,因为标题也附有这个不错的shema.org标记。好主意?
仅仅是因为有时标题不存在,但navbars实际上包含品牌名称,并且它们是标题themseves。
如果我这样做,我该如何标记什么<header>
现在?标题内的部分不正确?只是一个正常的<div>
我猜。
<body>
<div class="nav1"><h1>brandname</h1><nav>...</nav></div>
<header><h1>brandname</h1><p>slogan</p></header> <!-- sometimes this is not there -->
<div class="nav2"><h1>brandname</h1><nav>...</nav></div>
<div>content ...
对此
<body>
<header itemtype="http://schema.org/WPHeader" ...>
<div class="nav1"><h1>brandname</h1><nav>...</nav></div>
<div><h1>brandname</h1><p>slogan</p></div> <!-- sometimes this is not there -->
<div class="nav2"><h1>brandname</h1><nav>...</nav></div>
</header>
<div>content ...
多个头无效一方或?我正在考虑这样做,因为使用<header>
而没有任何CSS样式仅用于语义标记。我可以考虑用这个方法创造的造型障碍,因此不能100%满意。
或者这是有效的。
<body>
<header class="nav1"><h1>brandname</h1><nav>...</nav></header>
<header><h1>brandname</h1><p>slogan</p></header> <!-- sometimes this is not there -->
<header class="nav2"><h1>brandname</h1><nav>...</nav></header>
<div>content ...
//只是读html5: using header or footer tag twice?这一点,看起来像我坚持与第2解决方案,因为我真的很喜欢具有所有
不要没有标题是不敢接的想法;)
*是不是不好中堂没有'' * - 这是完全正常的... ... *多个标题无效或?* - 完全有效 –
多个标题有效吗?我想那对我来说是完美的,然后我做3''。 –
redanimalwar
是的,但是 - http://www.w3.org/TR/html-markup/header.html –