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 Chat (such as one of these permanent autoconfirmed members).

Hgroup element: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(→‎Oxford English Dictionary: Reformatted markup)
(Added DocBook example)
Line 171: Line 171:
   <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>
   <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>
  </hgroup>
  </hgroup>
=== [http://docbook.sf.net/ DocBook XSL Stylesheets] ===
* All content generated from DocBook yields the following output for title/subtitle (actually headings level can vary depending on the depth of element with title/subtitle):
<div class="titlepage">
  <h2 class="title">Title</h2>
  <h3 class="subtitle">Subtitl</h3>
</div>


[[Category:Proposals]]
[[Category:Proposals]]

Revision as of 09:01, 9 May 2011

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>
</div>

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>
</div>

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;">
  <a name="CHAPTER_I_THE_MOATED_GRANGE" id="CHAPTER_I_THE_MOATED_GRANGE"></a>
  <h2>CHAPTER I</h2>
  <h3>THE MOATED GRANGE</h3>
</div>

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

<h1>A TALE OF TWO CITIES</h1>
<h2>A STORY OF THE FRENCH REVOLUTION</h2><br>
<h2>By Charles Dickens</h2>

Techdirt

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>
  <p>...</p>
</div>

XKCD

<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.
  </div>
</div>

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>	
  ...
</div>

Oxford English Dictionary

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

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>
  </div>
</div>

Calgary Herald

Example article: Cooking Solo Grows Up

<div id="storyheader">
  <div class="headline">
    <h1>Cooking Solo Grows Up</h1>
  </div>
  <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>
  <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>
  <div class="clear">&nbsp;</div>
</div>

Panic

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>
</div>

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

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

PCWorld

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>
</div>

Computerworld

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>
    ...
</div>

Apple

<hgroup>
  <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>
</hgroup>

DocBook XSL Stylesheets

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