HTML Color text
HTML Tutorial » HTML Color Text
To color a text of a web page we have several methods such as:
1. RGB values
2. color names
3. hexadecimal values
4. HSL values (CSS3)
We can add Colors of a Text in different ways as:
Inline - by using the style attribute in HTML elements
Internal - by using a <style> element in the <head> section
External - by using an external CSS file as style.css
Syntax - Inline:
<tagname style="color:name_color">your text here</tagname>
Note: use external CSS instead
HTML Color Text can be set by using color names, rgb or hexadecimal - examples
Color Names:
With CSS, colors can be set by using color name, rgb or hex:
Color | HEX | RGB | Color |
---|---|---|---|
#FF0000 | rgb(255,0,0) | Red | |
#00FF00 | rgb(0,255,0) | Green | |
#0000FF | rgb(0,0,255) | Blue |
Example:
Example 1, colors can be set by using color name, rgb or hex - example
<!DOCTYPE html>
<html>
<head>
<title>HTML color text can be set by using color name, rgb or hex: - example</title>
</head>
<body>
<h1>HTML colors can be set by using color name - example</h1>
<span style="color:red">Your text here color:red</span>
<p style="color:#0000FF; background-color:#00FF00">Text here -
With CSS, colors can be set by using color hex - example</p> <p style="color:rgb(0,255,0); background-color:rgb(0,0,255)">Text here -
With CSS, colors can be set by using color hex - example</p>
</body>
</html>
Note: Use internal or external CSS instead.
HTML Colors text, code, style, background, picker, background, palette, hex, green, color
HTML Color Text - html tutorial
Online Editor
This tool makes it easy to create, adjust, and experiment with custom colors for the web.
HTML Templates

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.
CSS HTML Layout

Find here examples of creative and unique website layouts.
Free CSS HTML Menu

Find here examples of creative and unique website CSS HTML menu.