How can I make another heading in HTML?
I have used <h1>, <h2>, <h3>, <h4>, <h5> and <h6>, and now I would like to add <h7> and <h8> as I have different text types that I need to use.
If you cannot do this, is there a way to call upon CSS sheets for text, other than <p> and <h1> - <h6>?
HTML defines six levels of headings. A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading. The heading elements are H1, H2, H3, H4, H5, and H6 with H1 being the highest (or most important) level and H6 the least.
The HTML specification defines six headings. Browsers recognize six headings. If you start using <h7> and so on, then you'll be using an invalid element.
<h1>–<h6>: The HTML Section Heading elements The <h1> to <h6> HTML elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
You can declare this in your style sheet:
h7, h8, h9 { /* You can just go on adding headings */
display: block; /* Because this is a block level element */
}
h7 {
font-size: /* Whatever */ ;
}
h8 {
font-size: /* Whatever */ ;
}
But I would suggest you not to do so, as it doesn't carry any semantic meaning. Also it will be bad from a SEO point of view.
Also take a look at html5shiv. Just add the elements you want in the script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With