I have a title and subtitle like so:
The Programmer
Saving the world with bikesheds and perl hacks.
Which I’m representing like this:
<h1>The Programmer</h1>
<p><strong>Saving the world with bikesheds and perl hacks.</strong></p>
However perhaps this is more appropriate:
<h1>The Programmer</h1>
<p class="subtitle">Saving the world with bikesheds and perl hacks.</p>
But since it seem to make sense to put a subtitle class on the element wouldn’t this be better:
<h1>The Programmer</h1>
<h2>Saving the world with bikesheds and perl hacks.<h2>
Which would be more appropriate?
Well i think it that using proper markup it’s more appropriate, if it’s an header (like the start of a chapter) you should definitly use
<h2>. If it’s just a way of emphasize content i think it’s better to use the CSS class so that you explain what it is.If you use html 5 you may be intersted in teh
<header> tag like in this example:here and here there are some quick info on the header tag in html5.
You can also read this chapter of “Dive into html5” for more complete reference (read the whole book while you are at it, it’s good!)