HTML标题h,HTML H标题标签
可以將HTML標(biāo)題或HTML h標(biāo)簽定義為要在網(wǎng)頁上顯示的標(biāo)題或副標(biāo)題。當(dāng)你將文本放在標(biāo)題標(biāo)簽
……… h1>內(nèi)時, 它在瀏覽器中以粗體顯示, 并且文本的大小取決于標(biāo)題的數(shù)量。
從
到
標(biāo)簽定義了六個不同的HTML標(biāo)題, 從最高級別h1(主標(biāo)題)到最低級別h6(最重要的標(biāo)題)。
h1是最大的標(biāo)題標(biāo)簽, h6是最小的標(biāo)題標(biāo)簽。因此, h1用于最重要的標(biāo)題, h6用于最不重要的標(biāo)題。
HTML中的標(biāo)題可幫助搜索引擎理解網(wǎng)頁并為其編制索引。
注意:網(wǎng)頁整個內(nèi)容的主要關(guān)鍵字應(yīng)通過h1標(biāo)題標(biāo)簽顯示。
請參閱以下示例:
Heading no. 1
Heading no. 2
Heading no. 3
Heading no. 4
Heading no. 5
Heading no. 6
立即測試
輸出:
Heading no. 1
Heading no. 2
Heading no. 3
Heading no. 4
Heading no. 5
Heading no. 6
標(biāo)題元素(h1 …. h6)僅應(yīng)用于標(biāo)題。它們不應(yīng)僅用于使文本加粗或變大。
HTML標(biāo)題也可以與嵌套元素一起使用。以下是顯示標(biāo)題元素使用方式的不同代碼。
例:
Heading elementsThis is main heading of page.
h1 is the most important heading, which is used to display the keyword of page
This is first sub-heading
h2 describes the first sub heading of page.
This is Second sub-heading
h3 describes the second sub heading of page.
We can use h1 to h6 tag to use the different sub-heading with their paragraphs if
required.
輸出:
支持的瀏覽器
Element
Chrome
IE
Firefox
Opera
Safari
至
Yes
Yes
Yes
Yes
Yes
總結(jié)
以上是生活随笔為你收集整理的HTML标题h,HTML H标题标签的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 利用计算机解决鸡兔同笼问题,Python
- 下一篇: 浏览器的定制与扩展