Page title: With context

A page title with optional context label

This contains an optional parameter for average title length. The two valid values for this parameter are ‘medium’ or ‘long’. Medium titles are titles where the average is around 30 characters or less. Long titles would have an average length of nearer 50 characters or more.

On average the titles on government bits of content are 50 characters. The average for bits of general guidance are nearer 27 characters long.

How to call this component

<%= render partial: 'govuk_component/title', locals: { context: "Publication", title: "My page title" } %>

How this component looks


My page title