• Size and typeface of text
  • Bold, italics, capitals, underlines
  • Spacing between lines, words, and letters

The properties that allow you to control the appearance of text can be split into two groups:

  • Those that directly affect the font and its appearance (including the typeface, whether it is regular, bold or italic, and the size of the text)
  • Those that would have the same effect on text no matter what font you were using (including the color of text and the spacing between words and letters)

The formatting of your text can have a significant effect on how readable your pages are. As we look through these properties I will also give you some design tips on how to display your type.




Serif fonts have extra details on the ends of the main strokes of the letters. These details are known as serifs.


In print, serif fonts were traditionally used for long passages of text because they were considered easier to read.


Sans-serif fonts have straight ends to letters, and therefore have a much cleaner design.


Screens have a lower resolution than print. So, if the text is small, sans-serif fonts can be clearer to read.


Every letter in a ...

Get HTML & CSS: Design and Build Websites now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.