1) Introduction

What is CSS?

  • CSS stands for Cascading Style Sheets
  • CSS is a stylesheet represent how the HTML element is displayed on the screen/web page

Referencing CSS

1) External method:

  • CSS is in separate file with .css extension.
  • CSS is Added to the head element.
  • CSS Uses tag and two attributes, rel and href.  Rel for a relationship with a value of stylesheet and the href is to link to actual CSS files.
    Note: CSS does not need a closing tag as it is a void element.

2) Inline CSS:

It can be added to any HTML document with the style attribute.
Example :

3) Internal CSS
All CSS is written between opening and closing style tag.