HTML Text Color Style
HTML Tutorial » HTML Text Color Style
We can add color to a text as:
Inline - by using the style attribute in HTML elements
Internal - by using a <style> element in the section
External - by using an external CSS file
In HTML5, configuring web page fonts is using cascading style sheets.
The HTML style attribute has the following syntax:
Note: The old method, when using inline style or a font label, is outdated and should not be used anymore.
Syntax:
<tagname style="property:value;">
Adding HTML Text Color Style using CSS inline - examples
Example:
Example 1 HTML Text Color Style using CSS inline:
<!DOCTYPE html>
<html>
<head>
<title>HTML Text Color Style using CSS inline</title>
</head>
<body>
<h1>HTML Text Color Style using CSS inline</h1>
<span style="color:#0033FF">Here add your text color style in line #0033FF (blue)</span>
<p style="color:#FF0000">example - Here add your text color style in line red #FF0000</p>
<p style="color:red">Example - This is my text color style red</p>
</body>
</html>
Note: You will learn more about CSS Styleunder css-tutorial.html in this tutorial.
Adding HTML Text Color Style using CSS internal - examples
Example:
Example 1 HTML Text Color Style:
<!DOCTYPE html>
<html>
<head>
<title>Adding HTML Text Color Style using CSS internal - examples</title> <style>
span {
color: #0033FF;
}
p {
color: #FF0000;
}
</style>
</head>
<body>
<h1>Types of adding Adding HTML Text Color Style using CSS internal - examples using CSS inline</h1>
<span>This is my text color #0033FF (blue) using internal CSS style</span>
<p>This is my text color red #FF0000 using internal CSS style</p>
</body>
</html>
For external CSS style just make a file as style.css and replace
<style>
span {
color: #0033FF;
}
p {
color: #FF0000C;
}
</style>
with <link rel="stylesheet" href="style.css" type="text/css"/>
HTML Text Color Style
HTML Text Color Style - 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.