So I’m on commission for a website, and I’m trying to improve my code. When dealing with a website with multiple types of font (here it’s large, there it’s small, there it’s bold, here it’s underlined, etc.) is this where we use the h1-h6, or do we reserve those for times when there is a definite hierarchy, using instead <p class="xxx"> to define different classes for text?
So I’m on commission for a website, and I’m trying to improve my code.
Share
divandspan(the semantic free elements) if nothing more appropriate exists and addingclassandidif you need something more specific then anything that HTML provides explicitly.So only use headings if you have headings, and use them in order.
h1for the main heading,h2for subheadings,h3for subsubheadings, etc.If you can’t generate a sensible table of contents from the headings, then you almost certainly aren’t using them correctly.