HOME | PHP Tutorial | CSS
facebook icon
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

CSS Text Color

CSS Tutorial » CSS Text Color

The color property is used to set the color of the text. For example the color is specified by:
1. color name - like "green"
2. HEX value - like "#00FF00"
3. RGB value - like "rgb(0,255,0)"

We can add Text Color "color"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: Internal & External CSS.
color: value;

Syntax: Inline CSS inside of an HTML tag.
<tag style="color:value";>Yor text here</tag>
Note: use external CSS instead.

How to create CSS Text Color - examples

You can try to execute the following code to change the color of a texton this page.

Example 1, How to create CSS Text Bold - examples:

<!DOCTYPE html>
<title>CSS Text Bold - examples - example</title>
div.color1 {
color: #00FF00;;

div.color2 {
color: red;

div.color3 {
color: rgb(0,0,255);
<h1>CSS Text Color. The Color Property</h1>
<div class="color1">Your text here.</div>
<div class="color2">Your text here</div>
<div class="color3">Your text here</div>
<h2>CSS Text color. The color Property using inline CSS</h2>
<p style="color:blue;"> I'm a big, blue, <strong>paragraph</strong></p>
<h3>HTML simple Text bold.</h3>
<strong> I'm a big, blue, <strong>strong bold</strong> paragraph </strong>
Note: Use external CSS instead.

How to create HTML text color gradient - examples

CSS gradients let you display smooth transitions between two or more specified colors.

Example: HTML text color gradient - examples:
How to add bullet colors - examples
<!DOCTYPE html>
<title>CSS Text Bold - examples - example</title>
body {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(to right, #FDFBFB, #EBEDEE 70%);
} .text {
text-transform: uppercase;
background: linear-gradient(to right, yellow 0%, red 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font: {
size: 20vw;
family: $font;
</head> <body>
<h1 class="text">Hello World</h1>

Linear Gradient - Top to Bottom (this is default) - examples

Example: Linear Gradient - Top to Bottom - examples:
<!DOCTYPE html>
#gradient11 {
height: 250px;
background-color: red;
background-image: linear-gradient(red, yellow);
<h1>CSS Linear Gradient - Top to Bottom</h1>
<p>This linear gradient starts from the top red, transitioning to yellow:</p>
<div id="gradient11"></div>
<p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support gradients.</p>
</body> </html>

CSS text color, gradient, change, red, transparent, transition, code, example, property, rgb, fade CSS Text Color - css tutorial

3179. CSS align content Property - CSS align text - how to create, css tutorial
CSS align content Property - CSS align text - how to create css tutorial

2702. CSS Cursors - CSS tutorial
EchoEcho.Com : The complete CSS tutorial

821. CSS padding-top property - CSS tutorials - w3resource


3298. CSS background image opacity without affecting child elements, text or content, css tutorial
CSS background image opacity without affecting child elements, text or content css tutorial

823. CSS Text Align - CSS tutorials - w3resource


2229. CSS Tutorial - Display and visible
display:none; hides the paragraph and will NOT keep the space reserved to this element in the course of the document. All other elements will occupy the space reserved to this element and will act as if the element didn

Your add here
PHP count() Function

PHP str_replace() function

PHP html_entity_decode() function

PHP strip_tags() function

PHP strrchr() Function

PHP ucwords() function

PHP strtolower() function

PHP explode() function

PHP similar_text() function

PHP htmlspecialchars_decode() function

PHP trim() function

PHP printf() function

PHP substr() function

PHP strlen() function

PHP htmlentities() function

PHP wordwrap() function

HTML Image Background
CSS Border Width
Function eregi_replace() is deprecated in php - How to fix
HTML button onclick - How to create a HTML button style onclick
HTML Font Face