HTML for greens - HTML
Font color
How do I change the font color on a web page?
<span style="color: color">Enter text here</span>
black | |
white | |
silver | |
gray | |
maroon | |
red | |
purple | |
fuchsia | |
green | |
lime | |
olive | |
yellow | |
navy | |
blue | |
teal | |
aqua |
If you need more than these sixteen colors, you can visit the following website: Colors.
HTML editors often have a special color picker to easily choose a color of any shade.
Example {color}
After entering the following HTML code in an HTML editor:
<span style="color: red">This text is written in red font</span>
you will see the following on your browser screen:
This text is written in red fontQuestions and Answers
How to change the font color in HTML?
To do this, you need to enclose the text within a tag with an attribute set to an appropriate value: <span style="color: black">...</span>
(black), <span style="color: white">...</span>
(white), <span style="color: silver">...</span>
(silver), <span style="color: gray">...</span>
(gray), <span style="color: maroon">...</span>
(maroon), <span style="color: red">...</span>
(red), <span style="color: purple">...</span>
(purple), <span style="color: fuchsia">...</span>
(fuchsia), <span style="color: green">...</span>
(green), <span style="color: lime">...</span>
(lime), <span style="color: olive">...</span>
(olive), <span style="color: yellow">...</span>
(yellow), <span style="color: navy">...</span>
(navy), <span style="color: blue">...</span>
(blue), <span style="color: teal">...</span>
(teal), <span style="color: aqua">...</span>
(aqua).
How to use colors in HTML?
One of the most common ways to use colors on web pages is by changing the text color. By default, all text will be written in black or, occasionally, white when a dark theme is set in the operating system or web browser. To change the text color to something else, you just need to enclose it within a tag with an attribute set to an appropriate value. For example: <span style="color: red">...</span>
will change the text color to red.