我目前正以这种方式使用上述标记(经典标记顺序):
<html> <head>...</head> <body> <header>...</header> <section>...</section> <footer>...</footer> </body> </html>
标签的使用和规范在以前的HTML(4.x)版本中是非常严格的,而HTML5实际上不需要< head>和甚至< body>标签。
所以我将使用以下结构,其中IMHO比前一个语义更加语义。
<html> <header>...</header> <!-- put header and footer outside the body tag --> <body> <section>...</section> <section>...</section> <section>...</section> </body> <footer>...</footer> </html>
你怎么看?
解决方法
嗯,< head>标签与< header>标签无关。标签。在头部有所有的元数据和东西,因为头只是一个布局组件。 和布局进入身体。所以我不同意你。