View on GitHub

reading-notes

The Summury

Table of Content

  1. What is CSS
  2. CSS Selectors
  3. CSS Syntax

CSS

CSS (Cascading Style Sheets) allows you to create great-looking web pages, but how does it work under the hood? This article explains what CSS is, with a simple syntax example, and also covers some key terms about the language. documents in HTML will be readable in a web browser. Headings will look larger than regular text, paragraphs break onto a new line and have space between them. Links are colored and underlined to distinguish them from the rest of the text

CSS syntax

CSS is a rule-based language — you define rules specifying groups of styles that should be applied to particular elements or groups of elements on your web page. For example “I want the main heading on my page to be shown as large red text.”

The following code shows a very simple CSS rule that would achieve the styling described above:

logo

h1 { color: red; font-size: 5em; }

CSS Selectors

  1. tags
  2. class
  3. id

    The id is the most important selector <

Three Ways to Insert CSS

There are three ways of inserting a style sheet: