YOU DOWN WITH CSS?

What is CSS?

If HTML is the skeleton of a person, CSS, or Cascading Style Sheets, is that person's appearance.
From skin tone and height to hair style and shoes, all of this is designed through CSS!

Property Value pairs

The basic gist of CSS is that everything comes down to property: value pairs.
A property is the thing you want to change, such as: color, font-size, etc.
A value is what you want to change that property to, such as: color: red;, font-size: 21px;, etc.

Some basic styles

A quick note about colors:

Colors can be set with keywords, hex codes, rgb and hsl values

SYNTAX

A CSS Rule consists of a Selector and a Declaration Block.
A CSS Selector determines which HTML elements to target with the CSS Rule.
A CSS Declaration Block is an ordered collection of CSS Properties and Values.
When using property: value pairs— all properties and values should be separated by a colon and all property value pairs should be separated by a semicolon!

Three ways to apply CSS: Inline, Internal, and External

We want to, in general, get in the habit of separating our HTML from our CSS.
This is what external CSS is for.
But what if, for example, we only want to change the color of only one thing?
That's what internal or inline CSS is for.

Next: CSS Class & ID

Return to previous page
Return to main page