Search code examples
htmltagsfont-size

Can I chose among H1-H6 tags based on font size?


I am an old timer coder from when there wasn't CSS and when we used HTML only to embellish pages. I am saying this then my question will make sense.

OK being tags h1 to h6 set to define importance in page contents is wrong to chose different H tag based on font size in order to match the design?

For instances can I use H4 in the main title of a page just because it has the right size while H1 is too big?

Or in such case I should use H1 and restyle it to the font size I want instead?

Thanks!


Solution

  • Can I use <h4> in the main title of a page just because it has the right size while <h1> is too big?

    You can, but it is not semantically correct. CSS should be used for styling purposes. You can read about semantics and the benefits of writing semantic markup here.