HTML: Font Tag

Author: Ronald S. Holland
at
Total Application Works






HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]


To contact us

© 2002 - 2013 All Rights Reserved Total Application Works


  • Tell a friend about this site (copy and paste the following HTML page into a file (e.g., using Notepad).)

  • <html>
    <head>
    <title>Example of a font </title>
    </head>
    <body>
    <a href="http://sumtotalz.com/TotalAppsWorks/HTML/font.html">
    Font Tag </a>
    </table>
    </body>
    </html>




HTML - Font

The purpose of this tutorial is to show you how to write a HTML page using the font tag. It should be noted that the font tag has been deprecated in HTML 4.0. What is HTML (HyperText Markup Language)? HTML is a layout/tag language that is used to organize text and/or images on a web page. In the following example, we will show you the code for our page that uses the Font Tag. What is a Font tag? A Font tag is used to modify the size, face and color of a font. This is done by using the attributes to change the appearance of the text enclosed between the <Font> and </Font> tags. In other words, the <font> tag is used to add style, size, and color to the text on your web page. Use the size, color, and face attributes to customize your fonts.

Again, it must be noted that the font tag is deprecated and should not be used. Instead, use css styles to manipulate your font. In the next section, we will describe the Font attributes.

Font Attributes

You can change the appearance and style of a font by setting the attributes shown in Figure 1 below.

Attribute Example Purpose
size=number size=4 Defines the font size
size="+number" size="+2" Increases the font size
size="-number" size="-2" Decreases the font size
face="face-name" face="Monospace" Defines the font-name
color="color-value" color="lightyellow" Defines the font color
color="color-name" color="red" Defines the font color
Figure 1: Font Attributes


In the next section, we will describe how to use the Size attribute.

Font Size

You can change the size of your font with size attribute. The range of accepted values is from 1 (smallest) to 7 (largest). The default size of a font is 3.

Attribute Example Purpose
 
We are showing a sentence without the use of the Font size attribute. We are showing a sentence without the use of the Font size attribute.
size We are showing a sentence with the use of the Font size attribute. We are showing a sentence using the <Font size=5> attribute.
Figure 2: Font Size


Font Color

There may be times when you want to emphasize some text with color. This is done with the Color attribute.

Attribute Example Purpose
 
We are showing a sentence without the use of the Font color attribute. We are showing a sentence without the use of the Font color attribute.
color We are showing a sentence with the use of the Font color attribute. We are showing a sentence using the <Font color=blue> attribute.
Figure 3: Font Color


Font Face

You can choose a different font face using any font you have installed on your machine. Please note that fonts installed on your machine may not be commonly installed on other machines. To ensure that the user viewing the page is able to view the font, you should use common fonts.

Attribute Example Purpose
Face We are showing a sentence with the use of the Font Face=Monospace attribute. We are showing a sentence with the use of the Font Face attribute.
Face We are showing a sentence with the use of the Font Face=Times New Roman attribute. We are showing a sentence with the use of the Font Face attribute.
Face We are showing a sentence with the use of the Font Face=Arial attribute. We are showing a sentence with the use of the Font Face attribute.
Face We are showing a sentence with the use of the Font Face=Courier New attribute. We are showing a sentence with the use of the Font Face attribute.
Figure 4: Font Face











HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]


To contact us



© 2002 - 2013 All Rights Reserved Total Application Works