Home

The Anatomy of Cascading Style Sheets (CSS)

|
|  Updated:  
2016-03-26 15:52:07
HTML & CSS Essentials For Dummies
Explore Book
Buy On Amazon

Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics — the style and positioning — of elements within a web document written in a simple markup language.

CSS syntax is made up of two parts: the selector and the declaration block inside curly brackets. Inside the declaration block you can have multiple declarations. Each declaration is made of two parts — the property and the value:

p {font-face: Georgia, Tahoma; color: #ffcc00; }

In this example:

  • p is the selector.

  • {font-face: Georgia, Tahoma; color: #ffcc00; } is the declaration block.

  • font-face: Georgia, Tahoma; and color: #ffcc00; are separate declarations.

  • font-face is a property and Georgia, Tahoma is its value.

  • color is a second property and #ffcc00; is its value.

About This Article

This article is from the book: 

About the book author:

Sue Jenkins is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Jenkins has also created a series of courses on popular Adobe design tools including Photoshop and Illustrator.