CoderTools Web site

CSS Setting Foreground Color of an Element

Description


Use the color command to set the foreground color of an element. Typically used to change text color.

Note: Any borders will assume the color unless explicitly set to a different color using border-color. Note: This command will have no effect on images.
    color: #rrggbb;
    OR
    color: rgb(0-255,0-255,0-255);
    OR
    color: #rgb;
    OR
    color: name;
HTML & CSS Editor with FTP / FTPS

Examples for Color


test text test text test text test text
    <style>
        #test { color: red; }
    </style>

    <div id="test">test text test text test text test text</div>

test text test text test text test text
    <style>
        #test2 { color: #ff0000; }
    </style>

    <div id="test2">test text test text test text test text</div>

test text test text test text test text
    <style>
        #test3 { color: #f00; }
    </style>

    <div id="test3">test text test text test text test text</div>

test text test text test text test text
    <style>
        #test4 { color: rgb(255,0,0); }
    </style>

    <div id="test4">test text test text test text test text</div>
test text test text test text test text
    <style>
        #test5 { 
            color:          rgb(255,0,0); 
            border-style:   solid; 
            border-width:   1px;
        }
    </style>

    <div id="test5">test text test text test text test text</div>

Values for <Color>


Name Values Description
color color: #rrggbb;
color: rgb(0-255,0-255,0-255);
color: #rgb;
color: name;
Specifies the color of an element. Has no effect on images. Border will assume the same color unless explicitly set using border-color


TotalEdit Now Completely Free

CoderTools TotalEdit - The Free Text Editor

A powerful editor and notepad replacement TotalEdit makes it easier to complete your file editing and software development tasks. TotalEdit is FREE for commercial and non-commercial purposes (its freeware).

10/23/2014 9:32:31 PM
Terms Of Use | Privacy Statement | Copyright 2006-2010 © Independence Software LLP