CSS

  • CSS stands for Cascading Style Sheets - visual style (colour, font, …)
  • layout
  • animation

Like HTML, uses a declarative syntax.

Tutorials: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics

CSS Rule

A CSS rule has three parts:

  • selector
  • declaration block
  • one or more properties with values
div > div#b {
	background-color: deepskyblue;
	padding: 10px;
}
  • div > div#b: selector
  • padding: property
  • 10px: value

Where to Specify CSS

  1. In HTML tag using element style attribute
  2. Inline in document in <style> element
  3. link to file

CSS Selector