1.DTD文档声明头
<!DOCTYPE html>
<!>:警示标签
DOCTYPE:文档类型 html:HTML超文本标记语言
2.html标签
<html lang="en">
面页语言lang, en表示中文,中文还有zh,cn,zh-CN
3.head标签
<head></head>为网页配置,基本所有配置都写在mate中
<body></body>为网页的正式内容,浏览器可视区域
1.字符集charset
<meta charset="UTF-8">涵盖所有国家语言文字,国际化的字库
<meta charset="gb2312">只有汉族的文字和少量其他符号
<meta charset="gbk">是gb2312略微增强版,也只有汉语,但多了一些怪异汉字
不同的字符集在不同的计算机内部表达不一样
2.浏览器私有配置
<meta http-equiv="X-UA-Compatible" content="IE=edge">
对于一些双核浏览器可以加下句代码,表示尽可能打开用高级核打开页面
<meta name="renderer" content="webkit">
3.视口标签
<meta name="viewport" content="width=device-width, initial-scale=1.0">
配置手机移动端的相关标签
4.title属性
<title>XYB</title>
5.关键字
SEO搜索引擎优化
name属性是keywords,content是关键字中的内容,用逗号隔开
<meta name="keywords" content="">
以腾讯网页为例:
6.description页面描述
页面描述就是搜索引擎搜到之后展示的文字
<meta name="description" content="网页的描述">