Fundamentals of CSS by Lynda- CSS Syntax

Thankfully, learning CSS is fairly simple. There’s really not a lot to the syntax which makes it easy to get up and running quickly.

CSS styles are made up of two parts:

  1. The selector
  2. The declaration

The selector, here ‘p‘ for paragraph, tells the browser which element or elements in the HTML document to style.


The declaration, which is enclosed in these curly brackets, uses the formatting instructions for the style. Here, there are two rules: one telling the browser which font to use and another defining the size of the font.


The rules themselves are made up of two parts: the property and the value. These are separated by colons and use a semicolon to tell the browser to stop evaluating and move on to the next rule.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s