Welcome to CSS Learning — Learn how to style beautiful web pages!

Introduction to CSS

What is CSS?

CSS stands for Cascading Style Sheets. It is a stylesheet language used to control the appearance and presentation of HTML web pages.

CSS allows developers to change the color, size, font, spacing, alignment, borders, backgrounds and layout of HTML elements.

Why Do We Use CSS?

Without CSS, HTML pages would mainly contain plain text, images and other elements without attractive formatting. CSS makes websites more visually appealing and easier to use.

Examples of CSS Properties

Some common CSS properties include:

CSS Syntax

CSS uses a selector followed by one or more declarations.

p {
    color: blue;
    font-size: 18px;
}

Types of CSS

There are three main ways of applying CSS to an HTML document:

  1. Inline CSS – CSS is written directly inside an HTML element.
  2. Internal CSS – CSS is written inside the <style> element in the HTML document.
  3. External CSS – CSS is written in a separate .css file.

Conclusion

CSS is an important technology in web development. It works together with HTML to create attractive, organized and user-friendly web pages.