Can a <small> tag be inside an HTML5 heading (i.e. h1, h2, h3, etc...)?

Shaoz picture Shaoz · May 5, 2011 · Viewed 33.6k times · Source

I'm not sure about the convention regarding headings in HTML5, but I wanted to know if I could add a <small> in a <h3>, like this (this could apply to any tag inside any heading tags):

<h3>Payment details <small>(this is your default card)</small></h3>

Answer

Ian Oxley picture Ian Oxley · May 5, 2011

Yes, that markup validates. You can check it yourself on http://validator.w3.org/

Something to be aware of with HTML5 though is a change to the notion of block-level elements: https://developer.mozilla.org/en/HTML/Block-level_elements