Skip to main content
Course/Module 1/Topic 1 of 4Beginner

What is CSS?

CSS (Cascading Style Sheets) controls how HTML elements look — colors, fonts, sizes, spacing, and layout.

15 minBy Priygop TeamLast updated: Feb 2026

What is CSS?

CSS stands for Cascading Style Sheets. While HTML defines the structure of a page, CSS controls how it looks. Without CSS, every website would look like a plain text document. CSS lets you add colors, change fonts, control spacing, create layouts, and make pages responsive for mobile devices.

What CSS Can Do

  • Change text color, size, and font
  • Set background colors and images
  • Control spacing (margin and padding)
  • Create multi-column layouts
  • Add animations and transitions
  • Make websites responsive (mobile-friendly)
  • Style buttons, forms, and navigation menus

Your First CSS

Example
<!DOCTYPE html>
<html>
<head>
  <style>
    h1 {
      color: blue;
      font-size: 36px;
    }
    p {
      color: gray;
      font-size: 18px;
    }
  </style>
</head>
<body>
  <h1>Hello, CSS!</h1>
  <p>CSS makes this text gray and 18px.</p>
</body>
</html>

Try It Yourself: Your First CSS

Try It Yourself: Your First CSSCSS
CSS Editor
✓ ValidTab = 2 spaces
CSS|24 lines|403 chars|✓ Valid syntax
UTF-8

Quick Quiz

Chat on WhatsApp
Priygop - Leading Professional Development Platform | Expert Courses & Interview Prep