HTML - Subheading / Subtitle / SupTitle / Tagline / Slogan
Table of Contents
About
This page is about the HTML Markup for
- subheadings,
- alternative titles
- or taglines
Note that before the creation of the hgroup element, HTML did not have any dedicated tag. This article shows you how to mark a subheading with and without hgroup.
Example
With hgroup
With the hgroup, you can use heading tag because they will not create a section and will therefore not be added to the outline
<hgroup>
<h1>Dr. Strangelove</h1>
<h2>Or: How I Learned to Stop Worrying and Love the Bomb</h2>
</hgroup>
Without hgroup
Grouped with a header
Grouped with a header element
<header>
<p>SuperTitle of the year</p>
<h1>Title</h1>
<p>Subtitle</p>
<p>Date: Draft 9 May 2013</p>
</header>
Same line separated
- by a colon: the subtitle of a book is on the same line as the title separated by a colon.
<h1>The Lord of the Rings: The Two Towers</h1>
- by a inline element such as span
<h1>Ramones <br>
<span>Hey! Ho! Let’s Go</span>
</h1>