Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<basefont>

<basefont
color=colour
face=name
id=value
size=n>
</basefont>

Sets a default font size, font face and colour. The browser uses the information in the <basefont> tag for any text that you do not format with a style sheet or the <font> tag. All relative font size changes, for example font size="+1", are based on the base font.

This tag must appear before any text in the page.

For example

<basefont size="3">This sets the base font size to 3.</basefont>
<font size="+4">Now the font size is 7.</font>
<font size="-1">Now the font size is 2.</font>

Attributes

color=colour

Specifies the colour of the base font. The colour can be a hexadecimal, a red-green-blue colour value or a predefined colour name. See Using colour.

face=name

Specifies the name of the base font. You can specify a list of font names, separated by commas. If the first font is available on the system, it browser uses it. Otherwise, it uses the second, and so on. If none of the fonts are available, it uses a default font (probably Times Roman).

id=value

Specifies a unique name for the tag. No two tags can have the same id on a single page. The value must begin with a letter followed by any alphanumeric character, a hyphen, an underscore, a colon or a full stop. You use it to reference a unique style for a tag or to manipulate the tag with a script.

size=n

The size of the base font. You can enter a between 1 and 7 inclusive. The default is 3. Throughout the page, relative font size settings (for example, <font size="+3">) are set according to this size.