ScotConnect

Setting the size of text with the Font tag

The font element is no longer part of the HTML 4 standard - but ironically it is harder to create unreadable small, or large text, using the font element than it is using style sheets.

Even if a designer decides to set the entire contents of a page to size one , i.e. 40% smaller than the default size - the user still has the option to reset the text to a bigger size - by adjusting the text size in their browser preferences.

The font tag can be used to adjust the size of text by setting the value of the size attribute to an integer between 1 and 7; e.g.

<font size="1">

Or by setting a value as being a certain number less than or greater than the default size of 3, e.g.,

<font size="-2">

A change of 1 in the value of the size attribute represents a change in size of 20%.

Accessibility problems with using the font tag arise from their use to set text colour, and/or font choices. When text colour or font choice are set using the font tag, it may be impossible for the user to change from their browser preferences to suit their own needs.

The main argument against using the font tag, is that they make it harder to divorce the presentation of documents from the content - and this makes the code less portable, more costly to maintain and more expensive in terms of download times for users.

Accessibility is also affected when presentation tags are used to mimic the effects of proper markup, e.g. using font tags to make headings bold and big, rather than using the proper header tags.

Index | Next: Say goodbye to pixel perfect layouts, and embrace flexible design principles


Free weekly accessible web design tip

Register for your weekly accessible web design tip 
Email: