HTML heading tags and their limited number

Hello, I’m practicing HTML and I’d like to ask about headings. The document should start with the h1 tag and h6 is the tag used for the least important heading. But what if I want to include another heading, is there an h7?

Thank you for reading my question.

1 Like

have you tried googling your question?

Try it and see!

Post must be at least 20 char

Hi @RimMaalaoui

Heading elements go from h1 to h6. There is currently not a h7 element.

h1

h2

h3

h4

h5
h6

Here is an article on the heading tags showing their default values.

If you want to make your heading even smaller, you could use css to style a class or id selector, or you could create your own tag.

Happy coding

1 Like

Hi @Teller, thank you for answering my question. I guess the issue I’m struggling with is, what do I do if the page contains many important titles? I know that you should use one h1 heading per page for semantic reasons. Furthermore, I’m currently building a website, and it has many large titles, and it confused me.

1 Like

If you have many important titles, consider moving each section on to a new page. You may need to update the main page to include an index and link to the new page.

Happy coding

1 Like

Thank you very much and happy coding!

1 Like

You could use h1 and then h2 for the rest.

For example a book title might be h1 and each chapter after than would be h2.

2 Likes

Also remember that you can have multiple h2’s, h3’s and so on. Multiple h1’s are okay, but try to keep them down to as few as possible - one is optimal, from what I know. But keep that in mind. I thought I could have only 6 headers when I was learning - it was stressing me out until I realized this simple fact, lol!
Happy coding,
Nicolas

2 Likes

Thank you! Most of the lessons I’ve been using don’t mention this fact. So I thought about the possibility of running out of headings lol

3 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.