为什么即使在编写文档后,浏览器的页脚标签也会拉到 body 标签内。下面的例子?
Why does browser's pull footer tag inside body tag even after writing the doc. below example?
为什么 HTML 中的 Footer 标签总是被浏览器拉到 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 页脚标签拉入正文标签?
是的,标签进入其中
不要混淆:
<head> / <body>
and <header> / <main> / <footer>
/ 语义指的是
的 Document 全局结构
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
为什么 HTML 中的 Footer 标签总是被浏览器拉到 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 页脚标签拉入正文标签?
是的,标签进入其中
不要混淆:
<head> / <body>
and <header> / <main> / <footer>
/ 语义指的是
的 Document 全局结构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