English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <h4HTML: > tag

HTML <h4> The <h tag defines the fourth-level title in an HTML document. This tag is also commonly referred to as <h4> Element.

Online examples

 HTML h4Title:

!doctype html
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 h4Label usage (Basic Tutorial Website oldtoolbag.com)</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<h2>Heading 2</h2>
<p>This is the content that would appear under Heading 2.</p>
<h3>Heading 3</h3>
<p>This is the content that would appear under Heading 3.</p>
<h4>Heading 4</h4>
<p>This is the content that would appear under Heading 4.</p>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support <h4> Label.

Label definition and usage instructions

HTML <h4> elements are located within the <body> tag.

The range of headings can be from <h1> to <h6> is the most important heading, <h1> is the least important heading, <h6>.

> after the <h1> headings, <h2> and <h3Find the <h4>headings. Do not skip heading levels.

<h4>font display of headings is usually smaller than<h1> headings, <h2> and <h3>for small headings.

Do not just use<h4> tags to apply other formatting.<h4> tags are used to define heading levels, for example in a table of contents.

HTML 4.01 and HTML5differences between

In HTML 4.01 in, <h4> tag's "align" attribute has been deprecated. In HTML 5 in, <h4The "align" attribute of the > element is not supported. Please use CSS to align elements.

Attribute

AttributeValueDescription
alignleft
center
right
justify
HTML5 Not supported. HTML 4.01 Deprecated. Defines the alignment of the title text.

Global Attributes

<h4HTML: > tag support HTML Global Attributes.

Event Attributes

<h4HTML: > tag support HTML Event Attributes.

Related Articles

HTML Tutorial:HTML Titles