How to make new heading tag numbers such as h7, h8, etc.?

You can declare this in your stylesheet

h7, h8, h9 { /* You can just go on adding headings */
   display: block; /* Because this is 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 SEO point of view

Also take a look at html5shiv, just add the elements you want in the script


On another of my questions, which was completely unrelated, i received an answer to this question:


You can't make a heading 7, because there's only six different HTML headings (h1, h2, h3, h4, h5 and h6; reference: http://www.w3schools.com/tags/tag_hn.asp), but you can make a heading 6 with this CSS code:

h6.special { color:#464646; outline:0;
    font-family:Raleway, sans-serif; font-size:17px; }

and this HTML code:

<h6 class="special">I am special!</h6>






This solution does not damage seo and is fairly simple. I just though I should let everyone know. As a side question, can you change the "special"? Say if i changed it to

h6.raleway { color:#464646; outline:0;
    font-family:Raleway, sans-serif; font-size:17px; }

and this HTML code:

<h6 class="raleway">I am raleway!</h6>

Would this work? Thanks again for all you answers!

Tags:

Html