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 the
For HTML5:
Both statements you quoted are not correct or complete:
h1 doesn’t have to be used only once per document (and it doesn’t have to be used for the "main heading").When you always wrap sections in a sectioning content element (the spec encourages to do this), so every section has one heading at maximum, then it doesn’t matter which heading rank you choose, but:
[…] authors are strongly encouraged to either use only
h1elements, or to use elements of the appropriate rank for the section's nesting level
When you don’t always use sectioning content elements where appropriate, so a section has more than one heading, skipping heading levels (or using them for specifying "importance") can lead to an incorrect outline.