Published Jun 18, 2022Updated Jul 31, 2023
Contribute to Docs
<font> element was used to set the font characteristics of a text.
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 named
color, hexadecimal or RGB.
face: What font the text should be. For example, to have the text be
faceattribute would be set to
size: Sets the size of the font/text. It can use absolute units and relative units ranging from 1-7. Absolute units are used by
size="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 this
<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>
- BrandonDusch580 total contributions
- Not-Ethan48 total contributions
Learn HTML on Codecademy
Front-End EngineerFront-end engineers work closely with designers to make websites beautiful, functional, and fast.
Includes 34 Courses
With Professional Certification