HTML font Tag: Main Tips
- The HTML
<font>
tag sets the font size, color and face for specified content. - This HTML font size tag is deprecated, meaning that we do not recommend using it.
- Use CSS fonts instead for better functionality and browser-support.
How font Was Used
HTML <font>
codes define text style.
Warning: ever since HTML4, HTML styles elements only with the style element (or as an attribute). Use CSS fonts for better control and stability.
<p><font color="red" face="verdana" size="7">The text color is set to red, the font size is set to '7' and the font family is 'Verdana'.</font></p>
Note: the attribute value for the HTML font size tag is an integer (from 1 to 7). The value 1 is the smallest, 3 means the default size and 7 is the biggest font size.
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Attributes for font
color
Sets text color. Not supported in HTML5. Use CSS color property as an alternative.
face
Sets font family. Not supported in HTML5. Instead, use CSS font-family property.
<p><font face="verdana">The font family is set to 'Verdana'.</font></p>
size
Sets HTML font size. Not supported in HTML5. Apply CSS font-size property for better results.