Logo

CSS

What is CSS?

CSS means Cascading Stylesheets. While HTML defines the structure and semantics of your content, we use CSS for design and layout.

  • Selector: A CSS selector is used to specify the elements to which CSS rules apply.
  • Property: Name for a particular property to which a value is attributed.
  • Value: The value we assign to a property.
  • Declaration: Each pair of property and value is a declaration.

Css Syntax

Our selector can be:

  • tag: tagName
  • class: .className
  • id: #idName

Example

h1 {
    font-size: 30px;
}

.section-name {
    background-color: green;
}

#id-name {
    border: 2px solid blue;
}

Because the combination is endless, for today we are only going to use class selectors.

More information

CSS Syntax

Color Code