HTML 程序:在 HTML 文档中使用标题标签


2022 年 3 月 21 日, Learn eTutorial
2424

HTML 标题标签使用 <h1> 到 <h6> 标签定义。 <h1></h1> 标签提供最大的字体大小。通常,标题文本的字体大小从标签 <h1> 到 <h6> 逐渐减小。

以下示例显示了一个简单的 HTML 程序结构,该结构分别使用了这些不同的 HTML 标题标签。

HTML 源代码

                                          <!DOCTYPE html>
 <html>
    <head>
        <title>
            HTML PROGRAMING TUTORIALS - HEADING TAG
        </title>
    </head>
     
<body>
 <h1> This is the h1 header </h1>
 <h2> This is the h2 header </h2>
 <h3> This is the h3 header </h3>
 <h4> This is the h4 header </h4>
 <h5> This is the h5 header </h5>
 <h6> This is the h6 header </h6>
    </body>
</html>

                                      

输出

HTML