font

Form

<font> ... </font>

Attributes

attribyte default description
id none specifies the unique ID
class none specifies the style sheet class
style none specifies the style sheet
lang browser dependency specifies the language
size none specifies the font size
color none specifies the font color
face none specifies the font face

Support

HTML 3.2, HTML 4.01 [STF], XHTML 1.0 [STF], XHTML 1.1
Microsoft (MSDN)
[IE3 or later][Firefox 1 or later][Safari 1 or later][Opera 3 or later][Netscape 2 or later]

Explanation

The font tag specifies the size, color and face of a font. The size can be specified from a value of 1 to 7. The value 1 is the smallest size and the value 7 is the biggest size. You can also change the size relatively by adding plus sign (+) or minus sign (-) in front of a number like -7 and +5. The color can be specified by color name or color code. The face can be specified by the face attribute. Specifying several faces, they should be separated by commas. f they are separated by commas or there isn't the first specified font face, a second font face separated by commas is used. If there isn't even the second font face and is a third font face separated by commas, the third font face is used. The browser's default font face is used if none of the ones are found. In Mac version of Internet Explorer 5, a english font face won't be reflected, unless the lang="en" attribute is specified.
Use the <basefont> tag to specify the font sizes of a full page.
It is recommended to use the <font> tag. Use style sheets.

Related Tags

basefont

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
</head>
<body>
<h1>Sample</h1>
<p> You can <font color="red">color</font> and specify a specific <font="Optima" lang="en">font</font>.
</p>
</body>
</html>