I'm having trouble understanding the proper usage of HTML headings. I'm using books and online resources to self-learn but there are slight discrepancies on how to use them.
- Note that the
h1tag is only used once, as the main heading of the page.h2toh6, however, can be used as often as desired, but they should always be used in order, as they were intended. For example, anh4should be a sub-heading of anh3, which should be a sub-heading of anh2. - the logical heading level reflects its importance in relation to the main content.
So the question is:
Do I use them in order where h4 must be a sub-heading of h3 which should be a sub-heading of h2 and so on or use the heading levels according to its importance in relation to the main content?
Although, I have seen both methods being used. However, the second method kind of messes with the document outline. Just want to get some other opinions on this.