Michele Gaggia - Web Design - Lesson 2


Lesson 1 | Lesson 2 | Lesson 3 | Lesson 4 | Lesson 5



Text Formatting

Standard Font Categories

There are three main categories of fonts:

serif types: Times, Times new Roman, Georgia, etc.
These are the "classic" print fonts used in every standard novel book or newspaper. On screen they are only easy to read when they are large enough. They look better if Antialiasing (font smoothing) is turned on. Not recommended for small texts. Look OK at 14 pixel or lager.

sans-serif types: Verdana, Helvetica, Arial, sans-serif, etc.
These fonts have no decorations (the serife itself), look more "modern" and are very easy to read on screen at all sizes.
Very recommended for the main paragraph text (standard size: 10 to 12 pixels) and for small texts (8-9 pixel).
Even smaller texts should be created in graphical mode (Fireworks) using special "pixel-fonts": with these it is possible to make even 6-7 pixel sized fonts well readable.

monospace (typewriter) types: Courier, Courier New, Mono
These fonts look like those of an old typewriter. They are called "monospace" because all fonts (even a "i" and an "m") are exactly the same width. They can be useful when you need to arrange text and numbers in columns without needing tables (for example, for an invoice/rechnung).

Standard fonts on different OS platforms

As every operating system has a different set of standard fonts, and as browsers use the installed OS fonts to display text on screen, when creating web pages it is recommended to define several font types, so that if one is not installed the browser will use the next available one.
For example, <font face="Verdana, Helvetica, Arial, sans-serif"> will display in Verdana if available, otherwise in Helvetica or Arial if not available, or any other font belonging to the category "sans-serif". If none of these is available (or if no font type is defined), the standard font is usually Times / Times new Roman.

Using Non-Standard Fonts

There are two ways to achieve this:

Typical font type combinations: see Dreamweaver's Properties (Eigenschaften) box for fonts

Masking of Special Characters (Entities)

Special characters like umlauts (ä ü ö Ä Ü Ö), the German sharp "s" (ß), the Euro and Pound symbols (€ £), copyright, regsitered and trademark symbols (© ® ™), the paragraph symbol (§), apostrophes (" “ ”) , hyphens (- – —) etc. must be "masked" when inserted in a HTML document, otherwise they could be confused with the HTML tags, or not displayed properly. It is very hard to remember the masking of all special characters, but fortunately Dreamweaver does this automatically

Exercise 4.1: find out how Dreamweaver masks special characters.

Text Formatting using Standard HTML Tags

Standard HTML already provide at least some control over text formatting. This is done with the <font> tag with the parameter "face", "size" and "color"; the <p> and <div> tags with the parameter "align", <b>, <i> and <u> for bold, italics and underline variations, <sup> and <sub> for superscript and subscript.

HTML formatting has to be repeated for every paragraph, and every page.

Exercise 4.2: format your curriculum using the Properties (Eigenschaften) box.

Text Formatting using CSS (Cascading Style Sheets)

Formatting text using only the standard HTML tags presents several problems:

A more advanced way to format text is using Cascading Style Sheets. Typical CSS text formatting options are:

CSS can also be used to define the visual properties of any other HTML tag (tables, backgrounds, images, etc.).

There are two ways to integrate a CSS in a document:

To attach an external CSS file to a document you use the command:

<link rel="stylesheet" href="/css/style.css">

where "/css/" is the location of the CSS-style file (here defined as root-relative path), and "style.css" is the filename.
This command must also to be placed inside the head section of the HTML document (inside the <head> </head> tags).
The function in Dreamweaver is called "attach style sheet".

There are three types of CSS formatting:

After creating style sheets with Dreamweaver, it is most convenient to use the "Design > CSS Styles" panel to edit or apply styles (if not visible, open with [Shift+F11]).

Exercise 4.3: format your curriculum.htm file using CSS.

Microtypography

These are not just annoying details, but very important aspects to consider if you want to ensure the best possible readability of your texts:

Exercise 4.4: reload your "curriculum.htm" file and make sure every aspect of the text formatting meets all criteria defined above.
Also go through your other texts (projects, contact, etc.) and edit them accordingly (if you want you can also do this in MS Word).


Lesson 1 | Lesson 2 | Lesson 3 | Lesson 4 | Lesson 5


© 2003-2004 Michele Gaggia - all rights reserved