Label

Code

Markup


<label class="govuk-label">
  National Insurance number
</label>

Macro

{% from "label/macro.njk" import govukLabel %}

{{ govukLabel({
  "text": "National Insurance number"
}) }}

Label with bold text

(open in a new window)
Code

Markup


<label class="govuk-label govuk-label--s">
  National Insurance number
</label>

Macro

{% from "label/macro.njk" import govukLabel %}

{{ govukLabel({
  "classes": "govuk-label--s",
  "text": "National Insurance number"
}) }}

Label as page heading

(open in a new window)
Code

Markup


<h1 class="govuk-label-wrapper"><label class="govuk-label govuk-label--xl">
    National Insurance number
  </label>
  
</h1>

Macro

{% from "label/macro.njk" import govukLabel %}

{{ govukLabel({
  "text": "National Insurance number",
  "classes": "govuk-label--xl",
  "isPageHeading": true
}) }}