Text level elements - Character Fonts
|
Character styles specify the appearance or font of some text.
|
FONT and BASEFONT
They allows you to change the font size and/or color for the enclosed text.
FONT applies only to the text enclosed between the start and end tags.
BASEFONT element sets the base font size (using the size attribute).
Font size changes
achieved with FONT are relative to the base font size set by BASEFONT.
If BASEFONT is not
used, the default base font size is 3.
The attributes are:
- SIZE
- sets the size of the font. Possible values:
- An integer between 1 and 7. This sets the font to some fixed size,
whose rendering depends on the user agent. Not all user agents may
render all seven sizes. On your browser they are:-
size=1
size=2
size=3
size=4
size=5
size=6
size=7
- A relative increase in font size. The value "+1" means one size larger.
The value "-3" means three sizes smaller.
All sizes belong to the scale of 1 to 7.
- COLOR
- FACE.
- a comma-separated list of font names the user
agent should search for in order of preference.
Colors are given as RGB in hexadecimal notation or as one of 16 widely
understood
color names.
The FACE attribute is understood by some browsers and supports
a comma separated list of font names.
You can change the font displayed on a web page by using the FONT TAG
for example:
This is Courier .
<FONT FACE="Courier"> This is Courier </FONT>.
This will work fine for some time to come but FONT is slated to
disappear from HTML eventually. The replacement will be by using
style sheets.
They are supported by MSIE 4 and NS 4. An example:
<Head><Title>test page</Title>
<Style type="text/css">
.funny { font-family: "Comic Sans MS", Courier; color: red; }
</Style>
</Head><Body>
This is <span class=funny>comic</span> text!
</Body>
This is comic text!
|