Difference between revisions of "Cascading Style Sheets"
Jump to navigation
Jump to search
(basic format) |
(format) |
||
| Line 1: | Line 1: | ||
'''Cascading Style Sheets''' ('''CSS''') are used with [[HTML]] to give a web page designers centralized control over the appearance of each page. | '''Cascading Style Sheets''' ('''CSS''') are used with [[HTML]] to give a web page designers centralized control over the appearance of each page. | ||
==Format== | ==Format== | ||
| − | All definitions in CSS are written as < | + | All definitions in CSS are written as |
| + | <pre> | ||
| + | selector { | ||
| + | property: value; | ||
| + | }</pre> | ||
| + | For example, in order to change the background to red, and the text color to maroon, you would type, <pre>body {background:red; color:maroon}</tt>. Body is the selector - meaning you want to edit a characteristic of the body in html, background and color are the properties - background refers to the background color and color refers to the text color, and then red and maroon are the given values for those properties. | ||
[[category:internet]] | [[category:internet]] | ||
Revision as of 00:11, November 11, 2007
Cascading Style Sheets (CSS) are used with HTML to give a web page designers centralized control over the appearance of each page.
Format
All definitions in CSS are written as
selector {
property: value;
}For example, in order to change the background to red, and the text color to maroon, you would type,
body {background:red; color:maroon}. Body is the selector - meaning you want to edit a characteristic of the body in html, background and color are the properties - background refers to the background color and color refers to the text color, and then red and maroon are the given values for those properties.