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