Open In App
Related Articles

HTML <font> color Attribute

Improve Article
Save Article
Like Article

HTML <font> color Attribute is used to specify the text color inside the <font> element. we need to mention the color that we want to show on a text and it will be displayed on the screen having that mentioned color.


<font color="color_name|hex_number|rgb_number">

Attribute Values:

  • color_name: It sets the text color by using the color name. For example: “red”.
  • hex_number: It sets the text color by using color hex code. For example: “#0000ff”.
  • rgb_number: It sets the text color by using rgb code. For example: “rgb(0, 153, 0)”.

Note: The <font> color attribute is not supported by HTML5

Example: In this example, we are getting the colored text by using the color attribute having three different types of values.


<!DOCTYPE html>
        HTML | <font> color Attribute
    <font size="6" face="verdana" color="green">
    <font size="6" face="arial" color="#008000">
    <font size="6" color="rgb(128, 128, 0)">


Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

HTML is the foundation of webpages, is used for webpage development by structuring websites and web apps.You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 24 Nov, 2023
Like Article
Save Article
Similar Reads
Complete Tutorials