Heading
These examples are used for automated tests and may not follow service manual best practice.
Heading default
What is your full name?
Code
Markup
<h1 class="nhsuk-heading-l">
What is your full name?
</h1>
Macro
Heading size class
What is your full name?
Code
Markup
<h1 class="nhsuk-heading nhsuk-heading-l">
What is your full name?
</h1>
Macro
Heading size class overriding size option
Open this example in a new tab: Heading size class overriding size option
What is your full name?
Code
Markup
<h1 class="nhsuk-heading nhsuk-heading-l">
What is your full name?
</h1>
Macro
Heading with size S text
What is your full name?
Code
Markup
<h1 class="nhsuk-heading-s">
What is your full name?
</h1>
Macro
Heading with size M text
What is your full name?
Code
Markup
<h1 class="nhsuk-heading-m">
What is your full name?
</h1>
Macro
Heading with size L text
What is your full name?
Code
Markup
<h1 class="nhsuk-heading-l">
What is your full name?
</h1>
Macro
Heading with size XL text
What is your full name?
Code
Markup
<h1 class="nhsuk-heading-xl">
What is your full name?
</h1>
Macro
Heading with size S text and caption
Open this example in a new tab: Heading with size S text and caption
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-s">
<span class="nhsuk-caption">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size M text and caption
Open this example in a new tab: Heading with size M text and caption
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-m">
<span class="nhsuk-caption-m">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size L text and caption
Open this example in a new tab: Heading with size L text and caption
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-l">
<span class="nhsuk-caption-l">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size XL text and caption
Open this example in a new tab: Heading with size XL text and caption
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-xl">
<span class="nhsuk-caption-xl">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size S text and caption "after"
Open this example in a new tab: Heading with size S text and caption "after"
What is your home address?
About youCode
Markup
<h1 class="nhsuk-heading-s">
What is your home address?
</h1>
<span class="nhsuk-caption nhsuk-caption--bottom">
About you
</span>
Macro
Heading with size M text and caption "after"
Open this example in a new tab: Heading with size M text and caption "after"
What is your home address?
About youCode
Markup
<h1 class="nhsuk-heading-m">
What is your home address?
</h1>
<span class="nhsuk-caption-m nhsuk-caption--bottom">
About you
</span>
Macro
Heading with size L text and caption "after"
Open this example in a new tab: Heading with size L text and caption "after"
What is your home address?
About youCode
Markup
<h1 class="nhsuk-heading-l">
What is your home address?
</h1>
<span class="nhsuk-caption-l nhsuk-caption--bottom">
About you
</span>
Macro
Heading with size XL text and caption "after"
Open this example in a new tab: Heading with size XL text and caption "after"
What is your home address?
About youCode
Markup
<h1 class="nhsuk-heading-xl">
What is your home address?
</h1>
<span class="nhsuk-caption-xl nhsuk-caption--bottom">
About you
</span>
Macro
Heading text and caption "after" as a paragraph
Open this example in a new tab: Heading text and caption "after" as a paragraph
What is your home address?
About you
Code
Markup
<h1 class="nhsuk-heading-l">
What is your home address?
</h1>
<p class="nhsuk-caption-l nhsuk-caption--bottom">
About you
</p>
Macro
Heading with size S text and caption "before"
Open this example in a new tab: Heading with size S text and caption "before"
What is your home address?
Code
Markup
<span class="nhsuk-caption">
About you
</span>
<h1 class="nhsuk-heading-s">
What is your home address?
</h1>
Macro
Heading with size M text and caption "before"
Open this example in a new tab: Heading with size M text and caption "before"
What is your home address?
Code
Markup
<span class="nhsuk-caption-m">
About you
</span>
<h1 class="nhsuk-heading-m">
What is your home address?
</h1>
Macro
Heading with size L text and caption "before"
Open this example in a new tab: Heading with size L text and caption "before"
What is your home address?
Code
Markup
<span class="nhsuk-caption-l">
About you
</span>
<h1 class="nhsuk-heading-l">
What is your home address?
</h1>
Macro
Heading with size XL text and caption "before"
Open this example in a new tab: Heading with size XL text and caption "before"
What is your home address?
Code
Markup
<span class="nhsuk-caption-xl">
About you
</span>
<h1 class="nhsuk-heading-xl">
What is your home address?
</h1>
Macro
Heading text and caption "before" as a heading
Open this example in a new tab: Heading text and caption "before" as a heading
About you
What is your home address?
Code
Markup
<h2 class="nhsuk-caption-l">
About you
</h2>
<h1 class="nhsuk-heading-l">
What is your home address?
</h1>
Macro
Heading with size S text and caption "end"
Open this example in a new tab: Heading with size S text and caption "end"
What is your home address? About you
Code
Markup
<h1 class="nhsuk-heading-s">
What is your home address?
<span class="nhsuk-caption nhsuk-caption--bottom">
About you
</span>
</h1>
Macro
Heading with size M text and caption "end"
Open this example in a new tab: Heading with size M text and caption "end"
What is your home address? About you
Code
Markup
<h1 class="nhsuk-heading-m">
What is your home address?
<span class="nhsuk-caption-m nhsuk-caption--bottom">
About you
</span>
</h1>
Macro
Heading with size L text and caption "end"
Open this example in a new tab: Heading with size L text and caption "end"
What is your home address? About you
Code
Markup
<h1 class="nhsuk-heading-l">
What is your home address?
<span class="nhsuk-caption-l nhsuk-caption--bottom">
About you
</span>
</h1>
Macro
Heading with size XL text and caption "end"
Open this example in a new tab: Heading with size XL text and caption "end"
What is your home address? About you
Code
Markup
<h1 class="nhsuk-heading-xl">
What is your home address?
<span class="nhsuk-caption-xl nhsuk-caption--bottom">
About you
</span>
</h1>
Macro
Heading with size S text and caption "start"
Open this example in a new tab: Heading with size S text and caption "start"
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-s">
<span class="nhsuk-caption">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size M text and caption "start"
Open this example in a new tab: Heading with size M text and caption "start"
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-m">
<span class="nhsuk-caption-m">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size L text and caption "start"
Open this example in a new tab: Heading with size L text and caption "start"
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-l">
<span class="nhsuk-caption-l">
About you
</span>
What is your home address?
</h1>
Macro
Heading with size XL text and caption "start"
Open this example in a new tab: Heading with size XL text and caption "start"
About you What is your home address?
Code
Markup
<h1 class="nhsuk-heading-xl">
<span class="nhsuk-caption-xl">
About you
</span>
What is your home address?
</h1>
Macro
Heading text escaping
What to expect at A&E
Code
Markup
<h1 class="nhsuk-heading-l">
What to expect at A&E
</h1>
Macro
Heading with custom class and size
Open this example in a new tab: Heading with custom class and size
What is your full name?
Code
Markup
<h1 class="app-heading-s">
What is your full name?
</h1>
Macro
Heading with custom class and size as modifier
Open this example in a new tab: Heading with custom class and size as modifier
What is your full name?
Code
Markup
<h1 class="app-heading app-heading--s">
What is your full name?
</h1>
Macro
Heading with HTML
What to expect at A&E
Code
Markup
<h1 class="nhsuk-heading-l">
What to expect at A&E
</h1>
Macro
Heading with HTML and caption
Open this example in a new tab: Heading with HTML and caption
Urgent and emergency care services What to expect at A&E
Code
Markup
<h1 class="nhsuk-heading-l">
<span class="nhsuk-caption-l">
Urgent and emergency care services
</span>
What to expect at A&E
</h1>
Macro
Heading with HTML via call block
Open this example in a new tab: Heading with HTML via call block
What to expect at A&E
Code
Markup
<h1 class="nhsuk-heading-l">
What to expect at A&E
</h1>
Macro
Heading with HTML via call block and caption "end"
Open this example in a new tab: Heading with HTML via call block and caption "end"
What to expect at A&E Urgent and emergency care services
Code
Markup
<h1 class="nhsuk-heading-l">
What to expect at A&E
<span class="nhsuk-caption-l nhsuk-caption--bottom">
Urgent and emergency care services
</span>
</h1>
Macro
Heading with HTML via call block and caption "start"
Open this example in a new tab: Heading with HTML via call block and caption "start"
Urgent and emergency care services What to expect at A&E
Code
Markup
<h1 class="nhsuk-heading-l">
<span class="nhsuk-caption-l">
Urgent and emergency care services
</span>
What to expect at A&E
</h1>
Macro
Heading with link
Code
Markup
<h1 class="nhsuk-heading-l">
<a class="nhsuk-link" href="#/result/1">Skin colour changes</a>
</h1>
Macro
Heading with link and caption
Open this example in a new tab: Heading with link and caption
A to Z of NHS health writing Skin colour changes
Code
Markup
<h1 class="nhsuk-heading-l">
<span class="nhsuk-caption-l">
A to Z of NHS health writing
</span>
<a class="nhsuk-link" href="#/result/1">Skin colour changes</a>
</h1>
Macro
Heading with link opens in a new tab
Open this example in a new tab: Heading with link opens in a new tab
Code
Markup
<h1 class="nhsuk-heading-l">
<a class="nhsuk-link" href="#/result/1" rel="noopener noreferrer" target="_blank">Skin colour changes</a>
</h1>
Macro
Heading without class
What is your full name?
Code
Markup
<h1>
What is your full name?
</h1>