SQL PHP HTML JavaScript articles and free code
 
 

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 of hex =#003080</font> text of hex =#003080
<font color="#f00080"> text of hex =#f00080</font> text of hex =#f00080
<font color="#f0f040"> text of hex =#f0f040</font> text of hex =#f0f040
<font color="red"> text of hex =red</font> text of hex =red
<font color="green"> text of hex =green</font> text of hex =green


Here is a line of text with different color within the same line.

The code of above line is here <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>.

Further readings
How to change font type of the text in html using font tag
Manage the size of the fonts using font tag




Discuss this tutorial at forum

List of HTML Tutorials

 

Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.

Scripts
PHP
JavaScript
List of HTML Tutorial
HTML Tags
Color Chart
HTML Calendar
Tags on web page
Web Design
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.