Cascading Style Sheets (CSS)


ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.

If you find this helpful, please click the Google +1 Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.)

PDF mobile

Cascading Style Sheets

The primary purpose of the information in an HTML document is to provide the content to be displayed along with semantic markup that helps the user agent interpret that content. Web developers also need to be able to control how that content will appear, which is called its style. The style attribute can be used to provide a style for the content of the specific HTML element on which it is coded. Alternatively, style information in Cascading Style Sheets (CSS) can be used to provide style information in a separate file and apply those styles based on element types or other conditions, known as selectors.

CSS Style Selectors
CSS Style Properties
CSS Rules
CSS Escape Sequences

The backslash character is used to indicate several different escape sequences:

a backslash at the very end of a line is ignored, along with the following new line character(s)
a backslash, followed by up to six hexadecimal digits and a terminating space or new line (or else a non-alphanumeric separator) represents the ISO 10646 or Unicode character with that character code
special literals
a backslash followed by a special character represents the literal meaning of the character, revoking any special meaning of the character, for example:
  • \\ - a literal backslash
  • "\"" - a string with a single quote

HTML Color Picker

Easily find HTML color codes using the slider bars below

Use the HTML slider bar controls below to select a color. (Note: In a browser that does not yet support the HTML <input type="range"/> for a slider bar control, those input controls will appear as text input fields.)





background-color: #7f7f7f

background-color: rgba(127,127,127,1.0)

CSS Rules


Valid HTML 5