Form
<basefont>
Attributes
attribute |
default |
description |
id |
none |
specifies the unique ID |
class |
none |
specifies the style sheet class |
style |
none |
specifies the style sheet |
size |
none |
specifies the font size |
color |
none |
specifies the fontcolor |
face |
none |
specifies a font face |
Explanation
The basefont tag specifies the base font size, color and typeface of a full page. The font 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 font face can be specified by the face attribute. Specifying several font faces, they should be separated by commas. If 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 the case of specification of font (including the size and color) for each text, the
<font> tag is used. iThis tag is deprecated and should be used within a style sheet) The font tag doesn't work on browsers based on W3C like
Safari and Firefox.
<!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>
<basefont size="6">
</head>
<body>
<h1>Sample</h1>
<p>The basefont tag allows you to specify the base font size of a page.
</p>
</body>
</html>