Heading tags in HTML, H1 tags, H2, H3, H4, H5, H6

Heading tags in HTML, H1 tags, H2, H3, H4, H5, H6


In previous articles, Taimienphi.vn introduced you to attributes and elements in HTML. In the next article below, Taimienphi.vn will introduce you more about Heading tags in HTML.


Heading tag in HTML Used to define site content level and structure. Refer to the following article of Taimienphi.vn to find out the heading heading in HTML.

Heading tag in HTML

Table of Contents:
1. Heading tag in HTML
2. Use heading tags in HTML
3. Heading tag size in HTML
4. The hr tag in HTML
5. Head element in HTML
6. How to view the HTML source code
6.1. See HTML source
6.2. Check the HTML element
7. Tags in HTML

1. Heading tag in HTML

HTML consists of 6 heading tags, from h1 to h6, in descending order of heading tags, where the h1 tag identifies the most important heading and descends to the h6 tag.

By default the browser displays the text in heading tags with a larger font and darker text than regular text. In addition, the h1 card displays the largest font, while the h6 card is the smallest font.

For example, the following example illustrates heading tags in HTML:

the heading in html

The output after applying the heading tag looks like this:

the heading in html 2

2. Use heading tags in HTML

– Use heading tags in HTML to classify and highlight important headings and items in the document.

– Because search engines such as Google use heading tags to index the structure and content of web pages, we can take advantage of heading tags for the content on our website.

– Use heading heading h1 for the main title, most important, then heading tags h2, h3, … h6.

3. Heading tag size in HTML

Headings in HTML all have default sizes. However, if desired, you can specify any size for heading tags with an attribute style, use the attribute font-size in CSS.

For example:

the heading in html 3

The output will look like the following:

the heading in html 4

4. The hr tag in HTML

Card hr in HTML is used to create horizontal lines, separating content on HTML pages.

Element hr Used to separate content on HTML pages.

Example: The following example illustrates how to use hr tag in HTML:

the heading in html 5

The output after applying the hr tag looks like this:

the heading in html 6

5. Head element in HTML

Element head in HTML is an element that contains metadata (metadata). HTML metadata is data about the HTML document. Metadata not shown.

The head element is placed in the middle of the tag html and card body.

Example: Here is an example of head element in HTML:

the heading in html 7

The output after applying the head element should look like this:

the heading in html 8

6. How to view the HTML source code

6.1 View the HTML source code

To view the HTML source code, right-click the HTML page and select “View Page Source“(on Chrome browser) or”View Source“(in Edge browser). A window will appear showing the HTML source of the page.

6.2 Check the HTML element

Right-click the element (or any space), select “Inspect“or”Inspect Element“to view elements (including HTML and CSS elements) If desired you can edit HTML or CSS on the Elements window or the Styles window.

7. Tags in HTML

Below is a list of the tags in the HTML:

the heading in html 9

https://thuthuat.taimienphi.vn/the-heading-in-html-51107n.aspx
The above article Taimienphi.vn has just introduced you the Heading tag in HTML. In the next article, Taimienphi.vn will introduce you further the tags paragraph formatting in HTML.

.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *