Typography
Appropriate typography must be used in combination with the University's house style. Typography must not be changed using inline CSS.
Options available
Headings
Think about the structure of content on a page before choosing the appropriate heading. It is not about choosing one that looks nice, rather think about where the heading fits into the overall content hierarchy.
Use headings consistently across the entire site to maximise usability.
Do not skip headings in the structure, for example going from heading 2 to heading 4.
- There must be only one
h1
element on a page which should be used for the page title.. - You may use as many
h2
elements as required to denote new sections on a page. - You may use as many
h3
toh4
elements as required to denote sub-sections of content on a page. - You must not use
h5
orh6
elements.
Heading 1
Heading 2
Heading 3
Heading 4
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
Headings with secondary text
Where a heading would benefit from additional content, that adds context or supplementary information, this can be included by wrapping the text with <small>
tags.
Heading 2This is secondary text
<h2>Heading 2<small>This is secondary text</small></h2>
Headings with a dividing line
Headings that are followed by content which is wider than the heading itself may benefit from a visual indicator that the heading is related to that content. In these situations adding keyline--bottom
to the heading will add a full width dividing line.
- Please discuss your design requirements with the Digital Communications team before using this option.
Heading of an article
<h2 class='keyline--bottom'>Heading of an article</h2>
Body text
- The
p
tag defines a paragraph.
Bold and strong
- The class
.font-weight--bold
element defines bold text, without any extra importance. - The HTML
strong
element adds greater semantic importance to text which appears as bold. - Try to keep items in bold and strong as short as possible and do not write entire sentences or paragraphs in a bold or strong typeface.
- Bold and strong text should not be used as a substitute for headings.
Italics and emphasis
- The HTML
em
element defines emphasised text, with added semantic importance which is displayed in italics. - For accessibility reasons, avoid the excessive use of italics and emphasis on the web.
The following snippet of text is a wrapped in paragraph tags and includes a hyperlink.
The following snippet of text is rendered as bold text.
The following snippet of text is rendered as strong text.
The following snippet of text is rendered as emphasised text.
<p>The following snippet of text is a wrapped in paragraph tags and includes a <a href='#'>hyperlink</a>.</p>
<p>The following snippet of text is <span class="font-weight--bold">rendered as bold text</span>.</p>
<p>The following snippet of text is <strong>rendered as strong text</strong>.</p>
<p>The following snippet of text is <em>rendered as emphasised text</em>.</p>
Links
The default styling of a link is bold-weighted blue text with an underline.
Focus states
A contrasting yellow background is applied to text links when they receive focus. This is to improve usability for users navigating by keyboard. Further information on focus states can be found in our blog post - Keyboard accessibility improvements to the University website.
Reset link style
In situations where external content is included where it has its own branding, it may be necessary to prevent links inheriting the default style. The .reset--link-style
class can be applied either to a link element directly or to a parent element to achieve this.
<p><a href='#'>This is a link</a>.</p>
Abbreviated text
The abbr
tag is used to define an abbreviation or an acronym. This can give useful information to browser, translation systems, and search engines.
By default in desktop browsers the abbr
tag provides a tooltip.
abbr
tags are redundant on mobile browsers, so you should write out abbreviations and acronyms in full, for example World Health Organisation (WHO).
The WHO was founded in 1948.
<p>The <abbr title='World Health Organisation'>WHO</abbr> was founded in 1948.</p>
Paragraph lead
The introductory paragraph of a page often summarises what follows. Using a larger font size for this paragraph helps draw attention to it and its importance against other content on the page.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
Description list
Used to list terms along with their associated description. You may also wish to consider the paired values list pattern.
The dl
tag defines a description list, the dt
tag defines a term and the dd
tag defines the term's associated description.
- Lorem ipsum
- Dolor sit amet, consectetur adipiscing elit.
- Sed maximus nulla
- nec vehicula vestibulum.
- Cras eget elit tincidunt
- sollicitudin turpis quis, elementum felis.
<dl>
<dt>Lorem ipsum</dt>
<dd>Dolor sit amet, consectetur adipiscing elit.</dd>
</dl>
<dl>
<dt>Sed maximus nulla</dt>
<dd>nec vehicula vestibulum.</dd>
</dl>
<dl>
<dt>Cras eget elit tincidunt</dt>
<dd>sollicitudin turpis quis, elementum felis.</dd>
</dl>
Font size override classes
These headings use a typographic scale to ensure consistent sizing across different display sizes.
font-scale-minus-1
font-scale-reset (1rem)
font-scale-0
font-scale-1
font-scale-2
font-scale-3
font-scale-4
font-scale-5
font-scale-6
<p class="font-scale-minus-1">font-scale-minus-1</p>
<p class="font-scale-reset">font-scale-reset (1rem)</p>
<p class="font-scale-0">font-scale-0</p>
<p class="font-scale-1">font-scale-1</p>
<p class="font-scale-2">font-scale-2</p>
<p class="font-scale-3">font-scale-3</p>
<p class="font-scale-4">font-scale-4</p>
<p class="font-scale-5">font-scale-5</p>
<p class="font-scale-6">font-scale-6</p>