Reply to comment

Formatting subheadings/ bylines after Heading elements

Thanks for this post. It's very helpful.
I want to have subheads/bylines/heading descriptions that appear immediately after each heading.

For example:

H2 Matt's Cookie Recipes
Here I describe all my groovy cookie recipes

H2 Matt's Bread Recipes
With breads from around the globe

Anywhere but the web, these would be called subheadings. But since H2-6 are often called subheadings in web work, this jargon doesn't work. But regardless, I am trying to decide on the best way to mark them up in an authoring tool I am programming. I need to choose an inline element to wrap the subhead with, inside the Heading element.

* I want every heading to acomodate the optional subheads with the least amount of markup.

* I don't want to use spans for the subhead, as they might also be used for font specs on the heading itself.

* The subheading must align left, so it has to be an inline element that validates, then set to a block level element by CSS.

<style>
h1 small {display:block; font-size:.8em; color:gray}
</style>

<h1> Heading
Subheading
</h1>

This seems like the best approach, but perhaps I am missing something? Any ideas/Comments?

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <h1> <h2> <h3> <h4> <blockquote> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

Grow Your Business with Effective Website Design and SEO

Use experience and skills of a reliable SEO and a web designer I trust to get more sales from your website.