HTML and CSS Reference
In-Depth Information
A CSS rule is made up of a selector and a semicolon-separated list of
declarations inside brackets. Each declaration has a property and a
value separated by a colon. If an element in an associated HTML docu-
ment matches a selector in the style sheet, then the declarations will be
applied to that element.
To help you get the idea, here's a full example page with a style sheet.
The style sheet is in the head section of the document in a <style> ele-
ment. There are three rules in the style sheet: a rule for the <body> ele-
ment, a rule for the <p> element, and a rule for the <em> element:
<!DOCTYPE html>
<title>Simple CSS Example</title>
body {
font-family: "Komika
font-size: 250%;
p {
color: blue;
font-size: 1.4em;
em {
color: teal;
<p>A paragraph
<em>with emphasis</em>
Search WWH ::

Custom Search