CSS first steps

CSS can be used for very basic document text styling, it can be used to create a layout.

Using the browser compatibility table to check how this property is supported across various browsers.

CSS syntax

1
2
3
css-selector {
	property: value;
}

Comments

CSS comments begin with /* and end with */.

Comments helps to navigate the codebase as it gets larger.

“Commenting out” code is also useful for temporarily disabling sections of code for testing.

Applying CSS to HTML

Three ways to add CSS to our document:

  1. External stylesheet

    Create a .css extension file, linking CSS from the head of your document

    1
    
    <link rel="stylesheet" href="styles.css" />
    
  2. Internal stylesheet

    To create an internal stylesheet, you place CSS inside a