Reputation: 317
My page title is at the top of the page and stands out with a background color, but is a smaller font size than my H2. Is this semantically "allowed"? Or is it better to set my page title to H2?
Upvotes: 1
Views: 346
Reputation: 723518
There is nothing wrong with having an H1 be a smaller font size than an H2 if that is what your design calls for.
As far as HTML is concerned, an H1 is by definition higher-ranking than an H2. No amount of styling will change the semantics of an HTML document; the semantics are pre-baked into the markup language. In particular, the various heading elements have significant effects on how a document is outlined.
Upvotes: 1