ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
# meta > 提供关于html文档的元数据,不会展示在html页面中,是机器可读的。 > 属性: 1. http-equiv:content-type expire refresh set-cookie 2. name:author / description / keywords / generator / revised / others 3. content:用来定义http-equiv 与name的属性 ## SEO优化 1. 通过name定义keywords 和description ~~~ <meta name="keywords" content="your tags" /> <meta name="description" content="150 words" /> ~~~ 2. 设置robots 定义搜索引擎的索引方式 ~~~ <meta name="robots" content="index,follow" /> <!-- all:文件将被检索,且页面上的链接可以被查询; none:文件将不被检索,且页面上的链接不可以被查询; index:文件将被检索; follow:页面上的链接可以被查询; noindex:文件将不被检索; nofollow:页面上的链接不可以被查询。 --> ~~~ 3. 定义刷新或重定向 ~~~ <meta http-equiv="refresh" content="0;url=" /> ~~~ 4. 忽略页面中的数字为电话号码/邮箱 ~~~ <meta name="format-detection" content="telphone=no, email=no"/> ~~~ 5. 移动端适配 ~~~ <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0"> ~~~ # 详情参考 [meta](https://segmentfault.com/a/1190000002407912)