CSS - CSS Colors




CSS Color

Learn css - css tutorial - CSS Color - css examples - css programs

CSS Colors - Definition and Usage

  • In css, color property is used to apply the color to the text.
  • Color values is used to specify the colors to the element, web page etc.
  • It is used to apply the colors in various format: Hexadecimal,RGB,RGBA ,HSL,HSLA
CSS Colors
  • CSS uses color values to specify a color in the web page / website.
  • Typically, these are used to set a color for an element (i.e., its text).
  • They can also be used to affect the color of borders and other decorative effects.
  • We can specify the colors in various format.
Format Syntax Example
Hex Code #RRGGBB p{color:#FF0000;}
RGB Absolute rgb(rrr,ggg,bbb) p{color:rgb(0,0,255);}
keyword aqua, black, etc. p{color:blue;}

html sample code - html and css

TryitP //Paragraph
{
    color:#FF0000;
} 
        
click below button to copy the code. By - css tutorial - team

html code - html and css tutorial

Tryit<!DOCTYPE html>
  <html>
     <body>
        <h2 style="color:#00FF00">
        Welcome To Wikitechy
        </h2>
        <h2 style="color:rgb(255, 165, 0)">
        Best E Learning Website In The World
        </h2>
        <h2 style="color:blue;">
        You Can Learn All The Technologies Easily
        </h2>
     </body>
</html>
click below button to copy the code. By - css tutorial - team

Code Explanation - html css style

css text color
  1. Here, we are Applying hexadecimal color for h2 tag.
  2. Note: RGB values can also be assigned using hexadecimal color values in the form of: #RRGGBB, whereRR (red), GG (green) and BB (blue)are hexadecimal values between 00 and FF (same as decimal 0-255).
  3. Here, h2 element was defined for the statement “Best E-Learning Website In The World” whose RGB Colors values specify its color values based on the formula (red, green, blue).
  4. <h2 style="color:blue;">here we are applying blue color for h2 tag .

Code Output - css examples

web colors
  1. Here Hexadecimal color value is applied for Welcome To Wikitechy.
  2. Over here , the RGB color values is applied for Best E-Learning Website in the World.
  3. The Text “You Can Learn All the Technologies Easily” will appear in blue color.

This page provides a detailed information on learn to code html and css , best css sites , html and css course , css designer online , css programing , html css for beginners , web design css , learn html css , html css editor free , css training , html css website , css designer , css test online , learn html css javascript , css web , best html css editor , css advanced tutorial , css and html tutorial , learn css and html , advanced css tutorial.


View More Quick Examples

CSS BASICS & SELECTORS CSS SELECTOR ATTRIBUTE CSS STYLE FORMS COLORS & BACKGROUND CSS MARGIN & PADDING CSS WIDTH & HEIGHT CSS LINKS CSS BLOCKS

Related Searches to CSS - Colors