2.HTML的head标签

版权声明:关于版权问题:因为笔者有一颗热爱分享、奉献的心,如有雷同,纯属巧合,有侵立删,请各大网友监督。本文为博主原创文章,未经博主允许不得转载。除非加上本文章连接即可 https://blog.csdn.net/yi903718741/article/details/82635150

网页标题标签:

    <!--网页标题标题标签:告诉浏览器使用什么标题显示网页-->
    <title>head标签学习</title>

编码格式标签:

两个都可以用
    <!--网页解析编码格式配置(HTML5):告诉浏览器使用指定编码格式编码-->
    <meta charset="UTF-8"/>
    <!--HTML4:文档编码格式设置-->   
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

网页搜索优化标签(了解即可):

    <!--网页关键字-->
    <meta name="keywords" content="HTML,小明,13145" />
    <!--网页描述-->
    <meta name="description" content="本网页上是关于HTML的head标签学习的。" />
    <!--网页作者-->
    <meta name="author" content="小明" />

网页制定跳转标签:

    <!--5秒后自动刷新进入指定url网页-->
    <meta http-equiv="refresh" content="5;url=https://www.baidu.com"/>

其他标签:

例如:css引入标签和js引入标签请看更新

源码:

<html>
    <head>
        <!--head标签中主要配置浏览器的配置信息-->
        <!--网页标题标题标签:告诉浏览器使用什么标题显示网页-->
        <title>head标签学习</title>
        <!--网页解析编码格式配置(HTML5):告诉浏览器使用指定编码格式编码-->
        <!--<meta charset="UTF-8"/>-->
        <!--HTML4:文档编码格式设置-->
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

        <!--
            了解:
                关键字
                网页描述
                作者
            作用:
                提升网页在浏览器中的搜索概率
        -->
        <!--网页关键字-->
        <meta name="keywords" content="HTML,小明,13145" />
        <!--网页描述-->
        <meta name="description" content="本网页上是关于HTML的head标签学习的。" />
        <!--网页作者-->
        <meta name="author" content="小明" />
        <!--5秒后自动刷新进入指定url网页-->
        <meta http-equiv="refresh" content="5;url=https://www.baidu.com" />

    </head>

    <body>
        this is my first html.
    </body>
</html>  

猜你喜欢

转载自blog.csdn.net/yi903718741/article/details/82635150
今日推荐