Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML5 <h1> to <h6> tag


May 03, 2021 HTML5


Table of contents


Definitions and usages

HTML5 defines the title by the label. D efine the largest title. Define the smallest title.

Because the h element has exact semantics, choose the appropriate label hierarchy carefully to structure your document. T herefore, do not use the title label to change the font size in the same line. Instead, we should use the Cascade Style Sheet definition to achieve a nice display.

If you'd like to learn more about HTML tag selection and use, read Web Quality.

If you would like to practice using HTML5 and lt;h1> - slt;h6> tags, please refer to the "Learn h2 Tags" in the HTML5 programming practice on this site!

Six different HTML titles:

<h1>这是标题 1</h1>
<h1>这是标题 2</h1>
<h2>这是标题 3</h2>
<h4>这是标题 4</h4>
<h5>这是标题 5</h5>
<h6>这是标题 6</h6>

The difference between HTML 4.01 and HTML 5

In HTML 4.01, the "align" property of the h1 -h6 element is not approved for use.

In HTML 5, the "align" property of the h1 - h6 element is not supported.

The standard property

Labels support standard properties in HTML 5.

The event property

The tag supports event properties in HTML 5.

Read about it

HTML tutorial: HTML title