HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
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:

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:
Example 1, How to create CSS Text Bold - examples:

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

div.color2 {
color: red;
}

div.color3 {
color: rgb(0,0,255);
}
</style>
</head>
<body>
<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>
</body>
</html>
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>
<html>
<head>
<title>CSS Text Bold - examples - example</title>
<style>
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;
};
}
</style>
</head> <body>
<h1 class="text">Hello World</h1>
</body>
</html>


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



Example: Linear Gradient - Top to Bottom - examples:
<!DOCTYPE html>
<html>
<head>
<style>
#gradient11 {
height: 250px;
background-color: red;
background-image: linear-gradient(red, yellow);
}
</style>
</head>
<body>
<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
https://www.agernic.com/css-tutorial/css-align-content-property-css-align-text-how-to-create.html

2702. CSS Cursors - CSS tutorial
EchoEcho.Com : The complete CSS tutorial
http://www.echoecho.com/csscursors.htm

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

https://www.w3resource.com/css/padding/CSS-padding-top-property.php

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
https://www.agernic.com/css-tutorial/css-background-image-opacity-without-affecting-text-content.html

823. CSS Text Align - CSS tutorials - w3resource

https://www.w3resource.com/css/text/text-align.php

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
https://tutorialehtml.com/en/css-tutorial-display-and-visible/

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 List
HTML Font Face