Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

Summary

In this lesson, we learned that:

  • CSS (Cascading Style Sheets) is the language that describes how web pages look: colors, fonts, backgrounds, spacing and layout. HTML describes what is on a page, CSS how it looks.
  • A declaration, such as color: blue, consists of a property (what to change) and a value (what to change it to), separated by a colon. Several declarations are separated by semicolons.
  • A rule consists of a selector, which selects the elements, and declarations in curly braces: p { color: green; }.
  • There are three ways to add CSS to a page:
    • inline styles, in the style attribute of an element,
    • the style element in head, for one page,
    • an external stylesheet, a .css file linked in head with <link rel="stylesheet" href="style.css">.
  • External stylesheets are the most common: many pages can share one stylesheet, and HTML and CSS stay apart.

In the next lesson, CSS Selectors, you’ll learn to select exactly the elements you want to style, and you’ll find out what happens when several rules style the same element.

Instructions

  1. 1

    Congratulations on completing the first CSS lesson!

Back

6/6

  1. 1. Introduction to CSS
  2. 2. Inline Styles
  3. 3. Quiz: Inline Styles
  4. 4. Styles in the Document
  5. 5. External Stylesheets
  6. 6. Summary
Next

Try it yourself

Do this exercise right here in your browser. No account needed.