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

HTML Text Color


HTML Tutorial » HTML Text Color

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

Adding color to a text using CSS inline - examples


Example:
Example 1 Adding color to a text using CSS inline:

<!DOCTYPE html>
<html>
<head>
<title>Types of adding color to a text using CSS inline</title>
</head>
<body>
<h1>Types of adding color to a text using CSS inline</h1>
<span style="color:#0033FF">This is my text color #0033FF (blue)</span>
<p style="color:#FF0000">This is my text color red #FF0000</p>
<p style="color:red">This is my text color red</p>
<p><font color="green">This is my text color green</font></p>
<p><font size="3" color="#00ff00">Font size 3 and Green color</font></p>
</body>
</html>
Note: Browser Support All


Adding color to a text using CSS internal - examples


Example:
Example 1 Adding color to a text using CSS internal - examples:

<!DOCTYPE html>
<html>
<head>
<title>Adding color to a text using CSS internal - examples</title> <style>
span {
color: #0033FF;
}
p {
color: #FF0000;
}
</style>
</head>
<body>
<h1>Types of adding color to a text 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 just make a file as style.css and add under it
<style>
span {
color: #0033FF;
}
p {
color: #FF0000C;
}
</style>
and replace this with <link rel="stylesheet" href="style.css" type="text/css"/>

html text color
HTML Text Color - 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.


Upload Image, display, edit and delete i...
Login Form with Image background...
How to Create an Image with Transparent ...
Portfolio Gallery Website with filtering...
Simple pagination script PHP MySQLi...
Center Image in div...
Image Hover Overlay Fade...
Sticky image / element / div on scroll...
Responsive images...
Create rounded image in HTML CSS...
Add border around image...
Position Text Over an Image HTML CSS res...
Create a Slideshow Images Gallery...
Create a Sticky Sidebar...
Search bar using CSS HTML...
Shrink Navigation Menu on Scroll...
How to Create Accordion HTML Templates...
Dropdown menu in the navigation bar...
Responsive Top Navigation Bar with mobil...
Split horizontal navigation bar...