Font tag to manage color of the text

Inside the font tag we have to specify color in HEX value. There is a color chart available here to give you the hex value of any color. U

Note that we can specify some colors directly inside the font tag. We will see some examples also. Here is a list of text with different color tags with output .

<font color="#003080"> text hex=#003080</font> text hex =#003080
<font color="#f00080"> text hex=#f00080</font> text hex =#f00080
<font color="#f0f040"> text hex=#f0f040</font> text hex =#f0f040
<font color="red"> text hex =red</font> text hex =red
<font color="green"> text hex =green</font> text hex =green

Here is a line of text with different color within the same line.
<font color="green">Here is a</font> line of text <font color="red">with different color within</font> the <font color="#f00080">same line</font>.
Deprecated: FONT tag and its attributes are not supported in HTML5 ,
better to use styling using CSS.

Using CSS for font color

There are three ways to define colour of font inside any html element.

1. KEYWORDS like red, blue, green , black
2. Hex value like #FFFFCC, #0000FF, #34CC00
3. RGB value like RGB(255,45,55)

KEYWORDS ( Black, Green, Yellow, Red )

Font Color by KeyWords ( Red, green , yellow , blue )

HEX value of Red Green Blue ( #FFCC00, #00FFCC,#0000CC )

Font Color by HEX Value

RGB ( Red Green Blue)

The first number in RGB value mean value of Red from 0 to 255
Second number is the value of GREEN from 0 to 255
Third number is the value of Blue from 0 to 255
   color:rgb( 219, 89,74);
Font Color by RGB values
Type of fonts Font Size


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer