1. Basic format of HTML document:
<!DOCTYPE html> //文档类型声明 <html lang='zh-cn'> //表示HTML文档开始 <head> //包含文档元数据开始 <meta charset='utf8'> //声明字符编码 <title>基本</title> //设置文档标题 </head> //包含文档元数据结束 <body> //表示HTML文档内容 </body> //表示HTML <a href="http://wwww.baidu.com">百度</a> </html> //表示HTML文档结束
2. Document structure analysis:
1. Doctype
Document Type Declaration, also Called Doctype), it mainly tells the browser the type of document being viewed.
<!DOCTYPE html> 不区分大小写
2. HTML element
First of all, element means tag, and html element is html tag. The html element is the element at the beginning of the document and at the end of the document. It is a double tag that echoes the beginning and the end. The html element has an attribute and value
lang='zh-cn', which means that the document language is Simplified Chinese
<html> 如果为英文则,lang="en"
3. Head element
is used to contain metadata content. Metadata includes: , ,