Like HTML, CSS is not really a programming language. It is not a markup language either — it is a style sheet language. This means that it lets you apply styles selectively to elements in HTML documents. For example, to select all the paragraph elements on an HTML page and turn the text within them red, you'd write this CSS:
p {
color: red;
}
The whole structure is called a rule set (but often "rule" for short). Note also the names of the individual parts:
- Selector - the HTML element name at the start of the rule set.
- Declaration - a single rule like
color: red;
specifying which of the element's properties you want to style. - Properties - ways in which you can style a given HTML element.
- Property value - to the right of the property after the colon,
we have the property value, which chooses one out of many possible appearances for a given
property (there are many
color
values besidesred
).