If h1 is a title, is h2 a subtitle?

The answer: No.

Screen readers, etc., expect h1, h2, h3, h4, h5, and h6 to work like a table of contents for the page.

A subheading, subtitle, alternative title. or tagline is not a lower-level heading. It doesn't identify any content. It's either part of the heading, or it's just content.

So if the user should see/hear/etc. the sub-thing as part of the heading (i.e. if it should be visible in a table of contents) then include it inside the h* tag and then style it differently.

Or if the sub-thing is too large or unimportant to appear in a table of contents, then wrap everything in a header tag, and mark the sub-thing as a paragraph... and style to taste.


https://www.w3.org/TR/html52/common-idioms-without-dedicated-elements.html#subheadings-subtitles-alternative-titles-and-taglines



Comments

Popular posts from this blog

Callback, Promise, Observable, and Doughnuts

Learn grid and grid-template-areas FIRST!!!

The Day TDD Started Working for Me