The HTML Font Tag
In the second part of this tutorial we will talk about how to control the look of the text on your webpage using the HTML font tag.
Now we will talk about the HTML font tag and how to use the font tag to control the typeface(font name), size, and color of the text on your webpage. Let's take a look at an example of the font tag.
As with most HMTL tags, the font tag has an opening and closing tag. Any text between the opening (<font>) and closing (</font>) font tags will be controlled by that font tag. You can make a section of text on your webpage appear one way and give another section of text a completely different look by giving different values to the attributes of the font tag. The first attribute for the font tag is the face attribute. This is the attribute you will use to specify your choice of typeface or the font name. In the example, I have chosen Comic Sans MS, which is a common font on the web. Therefore I set the value of the face attribute to Comic Sans MS on the right side of the equal sign. You can specify more than one font name by listing the names in order of preference and separating them with a comma.
The size attribute is used to control; you guessed it, the size of the text on the webpage. You can use the numbers from 7 (largest) to 1 (smallest). This is called absolute font sizing. We will talk about relative font sizing later. You can control the size of the text by changing the value of the size attribute on the right side of the equal sign.
| | ||||||||||||||||||
This site needs an editor - click to learn more!
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map
Content copyright © 2023 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact
BellaOnline Administration
for details.