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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <font> Tag

Das HTML Font-Element (<font>) definiert die Schriftgröße, Farbe und Darstellung des Inhalts. Diese Eigenschaft wurde aus den Web-Standards entfernt, obwohl einige Browser sie derzeit noch unterstützen, könnte sie in Zukunft möglicherweise nicht mehr unterstützt werden. Verwenden Sie diese Eigenschaft daher nicht.

Online-Beispiel

Definiert die Textgröße, Schriftart und Farbe:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Grund教程(oldtoolbag.com)</<title> 
</<head>
<body>
<p><font size="3" color="red">Dies ist ein Text! </font></p>
<p><font size="2" color="blue">Dies ist ein Text! </font></p>
<p><font face="verdana" color="green">Dies ist ein Text! </font></p>
</body>
</html>
Testen Sie es heraus ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Alle gängigen Browser unterstützen das <font>-Tag.

Tagdefinition und Verwendungshinweise

HTML5 Das <font>-Tag wird nicht unterstützt. Verwenden Sie stattdessen CSS.

In HTML 4.01 Innerhalb von <font>-Element ist veraltet.

<font>-Tag definiert die Schriftart, Schriftgröße und Schriftfarbe des Textes.

Hinweise und注意事项

Hinweis:Verwenden Sie CSS, um den Text zu definierenSchriftart, Größe, Farbe.

HTML 4.01 with HTML5differences

HTML5 The <font> tag is not supported, HTML 4.01 The <center> tag is deprecated.

Optional Attributes

AttributeValueDescription
colorrgb(x,x,x)
#xxxxxx
colorname
HTML5 Not supported. HTML 4.01 Deprecated.    define the color of the text.
facefont_familyHTML5 Not supported. HTML 4.01 Deprecated.    define the font of the text.
sizenumberHTML5 Not supported. HTML 4.01 Deprecated.    define the size of the text.

Standard Attributes

In HTML 4.01 In the <font> tag supports the following standard attributes:

AttributeValueDescription
classclassnamedefine the class name of the element
dirrtl
ltr
define the text direction of the content within the element
ididdefine the unique id of the element
langlanguage_codedefine the language code of the content within the element
stylestyle_definitiondefine the inline style of the element
titletextdefine additional information about the element

For a complete description, please visitStandard Attributes.

Event Attributes

In HTML 4.01 where the <font> tag does not support any event attributes.

For a complete description, please visitEvent Attributes.