Play with Fonts
Fonts can bring character formatting to next level. Font face, font size, font color can be applied using Font tag in HTML. You can specify font name with 'Face' attribute of 'Font' tag. But what you need to remember here is, if the font you used when developing your page is not available on users computer, your font is replaced by user's browser with some other available font in his/her computer. So, you need to pay attention on what font you are using and if it is commonly available to your users or not. To work around this problem, you can list a number of fonts as alternatives. If the first font in the list is not available in users computer then succeeding font will substitute. Font lists can be created with Face attribute of Font tag.
Seven different relative sizes of font are available with Font tag. Another aspect is color. User color attribute with font tag to apply different color of text. Red, Green, Blue, Cyan, Magenta, Gray, Yellow, Black, White are some standard color names accepted directly by Font tag. You can even specify color of text with RGB or Hex codes. Hex codes are most commonly used in developing web pages.
Lets look at following examples:
Use font tag in HTML to format characters
Font face shkhanal. Not found in your computer, so, it is replaced
Font face Comic Sans Ms
Text color green applied with font tag
Font sizes can be applied with font tag.Seven different relative sizes are available as displayed below:
Font Size 1
Font Size 2
Font Size 3
Font Size 4
Font Size 5
Font Size 6
Font Size 7
Notice the font colors applied in above example. Another way of specifying colors is to use hex color codes as in following code
The 000000 Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
Following is the sample output of above code:
Use font tag in HTML to format characters
Font face shkhanal. Not found in your computer, so, it is replaced
Font face Comic Sans Ms
Text color green applied with font tag
Font sizes can be applied with font tag. Seven different relative sizes are available as displayed below:
Font Size 1
Font Size 2
Font Size 3
Font Size 4
Font Size 5
Font Size 6
Font Size 7
Notice the font colors applied in above example. Another way of specifying colors is to use hex color codes as in following code
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
The Hex Code Color
Suresh Khanal
http://www.studypark.site88.net/
|