Text Size

. Tuesday, June 3, 2008
1 comments

CSS gives you full control over the size of your text. Using CSS, you can set your text in any point size, the same way that all other print and graphic designers can already. This is immediately great for creating text bigger than what was originally possible (going up to size 7 with <font size> — the equivalent of only 36pt text). Now you can get infinitely big text.

It also means you can be far more precise with your font sizes — never before have you been able to get 11pt text, which lay between sizes 2 and 3.

To size your text you use the font-size property, and have a number of different units and methods with which to set the exact size. They are:

  • units: ems, points and pixels

  • pre-defined keywords

  • percentages

As we will see, some of these units are better than others for certain purposes.

Linking to parts of other documents

. Monday, June 2, 2008
0 comments

This is excellent. You can target specific sections of other pages by adding the #name bit on to the end of the href. The part after the hash mark is known as a “fragment identifier.” For instance, to link to the first section of this tutorial from somewhere else, you would write

<a href="http://www.yourhtmlsource.com/

text/internallinks.html#section-names">

Of course, the sections you can link to are restricted by which sections actually exist on the page you’re linking to. View the HTML source code (go to View > Source) of a page you want to link to and see if they have any sections named.