<font>

Christine_Yang269 total contributions
Published Jun 18, 2022Updated Jul 31, 2023
Contribute to Docs
The <font>
element was used to set the font characteristics of a text.
Note This is now deprecated. CSS properties like the
font
property should be used instead.
Syntax
At least one of the following three attributes is required for the <font>
element. However, any combination of them can be used:
color
: What color the font/text should be. The color can be set to a namedcolor
, hexadecimal or RGB.face
: What font the text should be. For example, to have the text beverdana
, theface
attribute would be set toface="verdana"
.size
: Sets the size of the font/text. It can use absolute units and relative units ranging from 1-7. Absolute units are used bysize="5"
or any other number 1-7. Relative units are relative the size of the<basefont>
element which is also deprecated. The attribute would look something like thissize="+5"
.
Example
<font color="pink">This text is pink</font><font size="5">This size is 5</font><font face="verdana">This text is in verdana font</font>
All contributors
- Christine_Yang269 total contributions
- BrandonDusch580 total contributions
- Not-Ethan48 total contributions
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.