May 30, 2021 Article blog
The basic structure of HTML files mainly contains some of the most basic file structure tags. Here's the table:
File structure tag | illustrate |
---|---|
<html>
|
<HTML 文档的开始>
|
<head>
|
<HTML 文档的头部开始>
|
<title>
|
<HTML 文档的标题信息开始>
|
</title>
|
<HTML 文档的标题信息结束>
|
</head>
|
<HTML 文档的头部结束>
|
<body>
|
<HTML 文档的主体开始>
|
</body>
|
<HTML 文档的主体结束>
|
</html>
|
<HTML 文档的结束>
|
As can be seen from the table above, the most basic structure of HTML files consists mainly of four tags,<html><html>
< head<head></head>
<title></title>
<body></body>
their meanings are described as follows:
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<!--xmlns 属性在XHTML中是必需的,但在 HTML 中不是。不过,即使XHTML文档中的 <html> 没有使用此属性,W3C的验证器也不会报错。
这是因为 "xmlns=http://www.w3.org/1999/xhtml"是一个固定值,
即使您没有包含它,此值也会被添加到<html>标签中-->
<head>
<title>HTML文件的基本结构</title>
</head>
<body>
</body>
</html>