English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

Etiqueta <basefont> de HTML

The HTML tag <basefont> is used to set the default font size of the document. <font> can be used to change the font size relative to the default font size.

Do not use this tag anymore!

Online Example

Specify the default color and size of text on the page:

<head>
	<basefont color="red" size="5" />
	</head>
<body>
	<h1>This is a heading</h/h1>
	<p>This is a paragraph.</p>/p>
	</body>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Only IE 9 and earlier versions of IE browsers support the <basefont> tag. It is recommended to avoid using this tag.

Tag Definition and Usage

HTML5 The <basefont> tag is not supported. Please use CSS instead.

En HTML 4.01 In , the <basefont> element is deprecated.

The <basefont> tag defines the default color, size, and font for all text in the document.

Tips and Notes

Tip:Use CSS to specify the default color, size, and font of text in the document.

HTML 4.01 con HTML5las diferencias

HTML5 No se admite la etiqueta <basefont>, HTML 4.01 Etiqueta <basefont> obsoleta.

Atributos opcionales

AtributoValorDescripción
colorcolorHTML5 No soportado. HTML 4.01 Obsoleto.    Especifica el color predeterminado del texto del documento.
facefont_familyHTML5 No soportado. HTML 4.01 Obsoleto. Especifica la fuente predeterminada del texto del documento.
sizenumberHTML5 No soportado. HTML 4.01 Obsoleto. Especifica el tamaño predeterminado del texto del documento.

Atributos estándar

En HTML 4.01 En los atributos, la etiqueta <basefont> admite los siguientes atributos estándar:

AtributoValorDescripción
classclassnameEspecifica el nombre de la clase del elemento
dirrtl
ltr
Especifica la dirección del texto del contenido del elemento
ididEspecifica el id único del elemento
langlanguage_codeEspecifica el código de idioma del contenido del elemento
stylestyle_definitionEspecifica estilos en línea del elemento
titletextEspecifica información adicional del elemento

Para una descripción completa, por favor visiteAtributos estándar.

Atributos de eventos

En HTML 4.01 donde la etiqueta <basefont> no admite ningún atributo de eventos.

Para una descripción completa, por favor visiteAtributos de eventos.