2.1.6 Letterspace all strings of capitals and small caps, and all long strings of digits

Acronyms such as CIA and PLO are frequent in some texts. So are abbreviations such as CE and BCE or AD and BC. The normal value for letterspacing these sequences of small or full caps is 5% to 10% of the type size.

Many typographers like to letterspace all strings of numbers as well. Spacing is essential for rapid reading of long, fundamentally meaningless strings such as serial numbers, and is helpful even for shorter strings such as phone numbers and dates.”

Letter spacing in CSS is achieved with the aptly named letter-spacing property. To letter space abbreviations at 10% of the type size you could wrap the abbreviations in <abbr> tags and apply a CSS rule such as:

abbr {
  letter-spacing: 0.1em;
}

If you have created static pages for your website then inserting <acronym> and <abbr> elements where appropriate might be slightly tedious but probably feasible. Dealing with text delivered by a content management system, however, is a different kettle of fish and would need some sort of automation. At this point your CMS developer would probably turn to regular expressions.

I’m not going to explain regular expressions here – there are plenty of resources elsewhere on the web – but in the form of a PHP function here is an expression to get you started:

$search = '/\b([A-Z][A-Z0-9]{2,})\b/';
$replace = '<abbr>$1</abbr>';
$text = preg_replace($search,$replace,$text);

This function looks for sequences of 3 or more uppercase letters or numbers, such as CSS, HTML and W3C, and wraps an <abbr> tag around them.

Rhythm & Proportion

§ Horizontal Motion

Reference

Cover of ‘The Elements of Typographic Style’ by Robert Bringhurst

Cover of ‘Web Typography’ by Richard Rutter