HTML H1 H2 H3 H4 H5 H6 title

 HTML has title tags of different importance levels, starting from the most important title H1 to the least important H6 title. By default, H1 has the largest font and H6 has the smallest font, but the size of these preset fonts All can be modified through CSS . How to choose these <H1><H2> ... <H6> to mark the title in the webpage? The easiest way is to choose according to importance. Usually an article uses <H1>, <H2> or even <H3> a lot, and a small part of it will use <H4> <H5> or even <H6>.


HTML H1 H2 H3 H4 H5 H6 Headline usage syntax

<H1>Here is the title text</H1> or <h1>Here is the title text</h1>


It is the same as the general standard HTML tags, as long as the title text is placed in the middle of the <H1></H1> tag, there is no difference in capitalization, that is, H1 and h1 can be written in this way, whether it is H1, H2, or H3 , H4, H5 or H6 are all written in the same way, and all major browsers support it.

HTML H1 H2 H3 H4 H5 H6 Example 1: Compare size
<H1>Here is the effect of Wibibi Title H1</H1>
<H2>Here is Wibibi Title Two</H2>
<H3>Here is Wibibi Title Three</H3>
<H4>He is Wibibi Title Four</ H2> H4>
<H5>Here is Wibibi Title Five</H5>
<H6>Here is Wibibi Title Six</H6>
The output of the above example

Here is the effect of Wibibi title H1

Here is the effect of Wibibi title H2

Here is the effect of Wibibi title H3

Here is the effect of Wibibi title H4

Here is the effect of Wibibi title H5
Here is the effect of Wibibi title H6
It can be seen from the example that the standard font of H1 is the largest, and the standard font of H6 is the smallest. It is too small to see clearly. If it has not been processed with CSS , it looks a bit difficult. It is not recommended to use H6 or even H5 in the web page text. , Unless there is a follow-up style design. In addition, the H1~H6 tags have the align effect by default, that is, the text is left, centered or right.

HTML H1 H2 H3 H4 H5 H6 example two, add align title
<H2 align="center">Here is the center heading</H2>
<H2 align="right">Here is the right heading</H2>
The output of the above example

Here is the center title

Here is the right header

The example uses H2 as a reference. Others such as H1, H3, H4, H5, and H6 have this alignment. The default align text alignment effect can easily set the position of the title. The available attribute values ​​are left (left) , Center (centered), right (aligned to the right), justify (aligned on both sides of the text line), etc., but this attribute is not recommended in versions after HTML 4.0.1, and is not supported in HTML5 . It is recommended to replace it The usage method is set through CSS text-align .

Post a Comment

0 Comments