Images
These examples are used for automated tests and may not follow service manual best practice.
Images default
Open this example in a new tab: Images default
Code
Markup
<figure class="nhsuk-image">
<img class="nhsuk-image__img" src="https://assets.nhs.uk/prod/images/A_0218_exercise-main_FKW1X7.width-690.jpg" alt="">
<figcaption class="nhsuk-image__caption">
No specific amount of time is recommended, but a typical training session could take less than 20 minutes.
</figcaption>
</figure>
Macro
Code
Markup
<figure class="nhsuk-image">
<img class="nhsuk-image__img" src="https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg" alt="Close-up of a person's tummy showing a number of creases in the skin under their belly button. Shown on light brown skin.">
</figure>
Macro
Images with srcset
Open this example in a new tab: Images with srcset
Code
Markup
<figure class="nhsuk-image">
<img class="nhsuk-image__img" src="https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg" alt="" sizes="(max-width: 768px) 100vw, 66vw" srcset="https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg 600w, https://service-manual.nhs.uk/assets/image-example-stretch-marks-1000w.jpg 1000w">
<figcaption class="nhsuk-image__caption">
Stretch marks can be pink, red, brown, black, silver or purple. They usually start off darker and fade over time.
</figcaption>
</figure>
Macro
Images with srcset and alt text
Open this example in a new tab: Images with srcset and alt text
Code
Markup
<figure class="nhsuk-image">
<img class="nhsuk-image__img" src="https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg" alt="Close-up of a person's tummy showing a number of creases in the skin under their belly button. Shown on light brown skin." sizes="(max-width: 768px) 100vw, 66vw" srcset="https://service-manual.nhs.uk/assets/image-example-stretch-marks-600w.jpg 600w, https://service-manual.nhs.uk/assets/image-example-stretch-marks-1000w.jpg 1000w">
<figcaption class="nhsuk-image__caption">
Stretch marks can be pink, red, brown, black, silver or purple. They usually start off darker and fade over time.
</figcaption>
</figure>