Typography with CSS

practice with Gutenberg text of Don Quixote

On the Web

 

Default typography

Since the <body> ... </body> tagset encloses all the displayed content on your page, you can set default characteristics of all the tags in your document by applying style rules to the body selector

Font size

The most useful ways of specifying font sizes are...

Other units of measure include the relative keywords small,medium, etc, ex units, even cm and inches!

Points pt may be usefully used in print stylesheets, but don't make as much sense on the screen

Font-size examples

Font family

Font availability

Fallback fonts

font-family: Arial Narrow, Arial, Helvetica, sans-serif

Link anchors and underlining

You can turn off link underlining by setting the text-decoration property of link anchors to 'none'.

Leading, spacing, first-line indent

Fonts inside tables