AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

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
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news 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
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news 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
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.