|
|
HTML kit - Text Controlling Tags Part 3It is now time to add a bit of spice to the otherwise dry text you have been used to till now. Various properties of text can be changed using the <FONT> tag. Font type, size and color can be modified using the appropriate attribute of this tag. I shall be discussing the following:
FACE <FONT FACE="Arial">This should be displayed in Arial</FONT> <FONT FACE="Verdana">This should be displayed in Verdana</FONT> <FONT FACE="Comic Sans MS">This should be displayed in Comic Sans MS</FONT> IMPORTANT: If you do not have the font installed in your system, the text will be displayed in the default font of your browser After reading the 'IMPORTANT' message above, you might be thinking... "What's the use of changing the font when I don't know what fonts are installed on the visitor's computer?". Let's suppose you want the text to be displayed in a Sans-serif font. (These are fonts whose ends are blunt as opposed to serifed fonts that have strokes, flares or taperings at the ends). The common Sans-serif fonts on Windows are Arial, Verdana, Comic Sans MS. Since you do not know which of these is installed on the visitor's computer, include all in the attribute! This tells the browser to use Arial and if it is not present, use Verdana, or if that is missing too, use Comic Sans MS. If the browser cannot find any of these fonts (highly unlikely, on a Windows system), it should just use any Sans-serif font available. COLOR <FONT COLOR="BLUE">Blue Text</FONT> <FONT COLOR="GREEN">Green Text</FONT> SIZE <FONT SIZE="2">Some Text</FONT> <FONT SIZE="3">Some Text</FONT> <FONT SIZE="4">Some Text</FONT> <FONT SIZE="5">Some Text</FONT> Also, you can use relative values, + and -, for increasing or decreasing font size relative to the current size. For increasing relative font size use values +1 to +6 and for decreasing use -1 to -6. Now play with the code:
Page contents: Html kit - online html free kit - learning html kit free - changing text on web pages
Page URL: http://www.webdevelopersnotes.com/tutorials/html/ html_kit_text_controlling_tags_part_3.php3
|
|