html学习_标签meta

meta

meta用于提供有关页面的元信息,例如针对搜索引擎的描述(description)关键词(keywords).
常位于html头部,其属性定义了与html相关联的名称/值对.

charset

其值规定html的字符编码,常为:utf-8.

content

定义与 http-equivname 属性相关的元信息。

name

  1. application-name: 规定页面所代表的web应用程序的名称
  2. author: 规定作者名字
  3. description: 规定页面的描述。搜索引擎会把这个描述显示在搜索结果中
  4. keywords: 规定一个逗号分隔的关键词列表 - 相关的网页(告诉搜索引擎页面是与什么相关的)

http-equiv

  1. content-type: 规定字符编码
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  2. default-style: 规定要使用的样式表
  3. refresh: 定义文档自动刷新的时间间隔
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <!-- 
        name:指定的数据名称
        content:指定的数据的内容,定义与name/http-equiv相关的内容
        keywords 网站的关键字,可以同时指定多个关键字 ‘,’隔开;
        比如京东网页源码;

        description 用于指定网站的描述,显示在搜索引擎的搜索结果中
        <meta name="description" content="这是网站描述">
    -->
    <meta name="keywords" content="html,css3">
    <meta name="description" content="这是网站描述">
    <!--
        将页面重定向到另一个网站,3是指3秒后跳转;  
        <meta http-equiv="refresh" content="3;url=https://www.baidu.com">

    -->
    <meta http-equiv="refresh" content="3;url=https://www.baidu.com">
    <title>Document</title>
</head>
<body>
    <p>3秒后跳转</p>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值