Font tag to manage color of the text

Read the basic of html font tag here.
We can manage the color of the text in html by using font tag. 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. Use that hex value to create different color font for your body tag. As font tag has one closing tag also so we can use font tag to mark part of a full text in different colors using font tag with different hex values of color.

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
<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 )


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


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);

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-2021 All rights reserved worldwide Privacy Policy Disclaimer