为什么即使编写了文档,浏览器的pull footer标签仍在body标签内。下面的例子?

时间:2018-10-26 06:14:21

标签: html html5 dom html5-history

为什么浏览器总是将HTML中的页脚标记拖到BODY标记内?为什么不能像Head Tag一样贴在Body Tag之后?

例如:

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" media="screen" href="css/style.css" />
        <meta />
        <script src="js/app.js"></script>
    </head>
    <body>
        <h1> Thank you </h1>
        <script src="js/app-1.js"></script>
    </body>
    <footer>
        <ul>
            <li> <a href="/">home</a> </li>
        </ul>
    </footer>
</html>

为什么浏览器将此html页脚标签拖到body标签中?

1 个答案:

答案 0 :(得分:2)

是的,标记进入了那个

不要混淆:

<head> / <body>
and <header> / <main> / <footer>

/语义是指文档全局结构,

the <head> mainly contains the document meta-data,
and the <body> contains the document content

其中包含的文档元数据可以

Editorial Meta-Data
    <title>: The title shown in browser tabs, history, favorites, …
    <meta>: Keywords, Descriptions
    <link>: References to, icons, related documents
Technical Meta-Data
    <base>
    <style>
    <script>

在此处了解更多.. qoura