A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on IRC (such as one of these permanent autoconfirmed members).

Hgroup element

From WHATWG Wiki
Revision as of 12:14, 9 May 2011 by Lachlan Hunt (talk | contribs) (Added MiniApps)
Jump to: navigation, search

This page documents use cases and existing usage patterns related to marking up subtitles and taglines within headers.

Real World Examples

The following are real world pages all using various structures to mark up subtitles and taglines for page and article headers. Each one contains the markup copied and pasted directly from the site, only modified where necessary to tidy up whitespace or to omit irrelevant content from the header where indicated.

The Telegraph (UK)

Example article: Coca Cola recipe 'discovered'

<div class="storyHead">
  <h1>Coca Cola recipe 'discovered'</h1>
  <h2>A website claims to have uncovered Coca-Cola's top secret recipe.</h2>

National Geographic

Example article: Einstein Theories Confirmed by NASA Gravity Probe

<div id="page_head">
  <h1>Einstein Theories Confirmed by NASA Gravity Probe</h1>
  <h2 class="subtitle">Space mission did what the famed physicist said would be impossible.</h2>

Project Gutenberg

Example article: The War of the Worlds, by H. G. Wells

<h3 class="chapnum">CHAPTER ONE</h3>
<h3 class="chaptitle">THE EVE OF THE WAR</h3>

Example article: The Madcap of the School, by Angela Brazil.

<div style="margin: auto; text-align: center; padding-top: 0pt; padding-bottom: 1em;">
  <h2>CHAPTER I</h2>

Example article: A Tale of Two Cities, by Charles Dickens

<h2>By Charles Dickens</h2>


Example article: When Copyright And Contracts Can Get In The Way Of Art

<div class="story">
  <h1>When Copyright And Contracts Can Get In The Way Of Art</h1>
  <h3>from the <i>tales-from-the-creative-front-lines</i> dept</h3>


<div id="topRightContainer">
  <div id="logo">
    <a href="/"><img src="http://imgs.xkcd.com/s/9be30a7.png" alt="xkcd.com logo" height="83" width="185"/></a>
    <h2><br />A webcomic of romance,<br/> sarcasm, math, and language.</h2>
    <div class="clearleft"></div>
    <br />
    XKCD updates every Monday, Wednesday, and Friday.

Yahoo! Finance

Example article: Gas prices expected to drop 50 cents by summer

<div id="y-article-hd">
  <h1 class="test1">Gas prices expected to drop 50 cents by summer</h1>
  <h2>After 44 days of surging gas prices, analysts expect drop of 50 cents by summer driving season<br></h2>
  <a href="http://us.rd.yahoo.com/finance/news/apf/SIG=10kfmofol/*http://www.ap.org/termsandconditions" rel="nofollow"><img src="http://l.yimg.com/a/i/us/fi/gr/ap_106x27.gif" alt="ap" class="sponsorimage"></a>	

Oxford English Dictionary

    <p>Discover the story of English</p>
    <span class="blurb">
      <p>More than 600,000 words, over a thousand years</p>

Dive Into Accessibility

<div id="logo">
  <div class="inner">
    <h1 class="title"><a href="/" accesskey="1">Dive Into Accessibility</a></h1>
    <p>30 days to a more accessible web site</p>
    <a class="skip" href="#startnavigation">Skip to navigation</a>
    <span class="divider">&nbsp;</span>

Calgary Herald

Example article: Cooking Solo Grows Up

<div id="storyheader">
  <div class="headline">
    <h1>Cooking Solo Grows Up</h1>
  <div class="clear">&nbsp;</div>
  <div class="subheadline">
    <h2>On your own? You no longer have to put up with cereal over the sink or days of the same old leftovers. Joe Yonan shows us why</h2>
  <div class="clear">&nbsp;</div>
  <div class="byline">
    <span class="name">By Gwendolyn Richards, Calgary Herald</span>
    <span class="timestamp">May 8, 2011 2:06 AM</span>
    <span id="lblComment" class="comments"></span>
  <div class="clear">&nbsp;</div>


Example page: Coda - One-Window Web Development for Mac OS X

<div id="header">
  <h1><a href="/coda/" title="Coda">Coda</a></h1>
  <p>One window web development.*</p>

Example page: Unison - The Best Usenet Browser / Newsreader, Only For Mac OS X

  <a href="http://www.panic.com/unison/" title="Unison - The Best Usenet Browser">Unison</a>
  the best usenet browser


Example article: Top 15 Android Apps For Smartphone Shutterbugs

<div id="articleHead">
  <h1>Top 15 Android Apps For Smartphone Shutterbugs</h1>
  <h2>Use these Android apps to add effects to your mobile photos and make them easier to take.</h2>

  <p class="byline">By <a href="/author/Daniel-Ionescu">Daniel Ionescu</a>,
     <a href="http://www.pcworld.com/" target="_blank">PCWorld</a>
     &nbsp;&nbsp; <script type="text/javascript">timestamp(1304707200000,'longDateTime')</script>May 6, 2011 8:40 pm</p>


Example article: Elgan: How to pop your Internet 'filter bubble'

<div id="article_header" class="clearfix">
  <div id="content_type">Opinion</div>
  <h1>Elgan: How to pop your Internet 'filter bubble'</h1>
  <h2>Personalization algorithms are stereotyping you, then hiding information from you based on that stereotype. Wait -- what?</h2>
  <div id="byline">By Mike Elgan</div>
  <div id="date">May 7, 2011 08:00 AM ET</div>


  <h1><img src="http://images.apple.com/imac/images/features_title20110426.png" alt="Its beauty is way more than screen  deep. " width="766" height="46" class="center" /></h1>
  <p class="intro">All-new quad-core processors. Advanced graphics. Thunderbolt technology. FaceTime HD. iMac is a desktop workhorse disguised as an all-in-one wonder.</p>

DocBook XSL Stylesheets

  • All content generated from DocBook yields the following output for title/subtitle (actualy heading levels can vary depending on the depth of element with title/subtitle):
<div class="titlepage">
  <h2 class="title">Title</h2>
  <h3 class="subtitle">Subtitl</h3>


  <h1><a href="http://miniapps.co.uk/" title="Home page"><span>MiniApps</span></a></h1>
  <h2>Beautifully crafted mobile web apps.</h2>