HTML and CSS Reference
In-Depth Information
FiGure 8-4
In addition to changing color to indicate a different link state, you can also define the font-weight
property, which determines whether or not text is bold. To give a link state (or any other text) a
bold appearance, use this code:
font-weight: bold;
If text already has a bold value applied, you can remove it by setting the font-weight property to
normal , like this:
font-weight: normal;
The CSS specification for the font-weight property actually calls for the user
to be able to define varying degrees of boldness, from 100 to 900 (in 100-unit
increments). Unfortunately, almost no browsers — with the exception of Firefox 3
and above on the Mac — as of this writing render different font weights.
Another CSS property often used in styling link states is text-decoration . As noted earlier,
the default style for the a:link state includes underlined text — this is accomplished by the
text-decoration property. Other possible values for this property are overline , line-through ,
blink , inherit , and none . One common technique is to turn the underline style off for the
a:link state and then enable it for the a:hover state, like this:
a:link { text-decoration: none; }
a:hover { text-decoration: underline; }
Search WWH ::




Custom Search