Style rule (CSS)

From Wiki @ Karl Jones dot com
Revision as of 11:02, 3 May 2016 by Karl Jones (Talk | contribs) (Created page with "In Cascading Style Sheets, a '''style rule''' is a definition which affects the presentation of HTML. == Example == Say the HTML looks like this: <pre> <body>...</...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In Cascading Style Sheets, a style rule is a definition which affects the presentation of HTML.

Example

Say the HTML looks like this:

<body>...</body>

The style rule below sets the background color for the body of the web page:

<style>
 body { background-color: #cccccc; }
</style>

See also