Skip to main content
Syllabus
On this page

CSS Introduction & History: What Is CSS and Why It Matters

Badar KhalilUpdated September 29, 2026 4 min read

CSS Introduction: What Is CSS?

CSS (Cascading Style Sheets) is the language used to describe the presentation of a web page. HTML defines the structure and meaning of content (headings, paragraphs, links, images), while CSS defines how that content looks: colors, fonts, spacing, layout, animation and responsive behavior. This CSS introduction gives you the foundation for everything else in this course.

The three core web technologies work together like this:

  • HTML - the skeleton (structure and content).
  • CSS - the skin and clothing (design and layout).
  • JavaScript - the muscles (behavior and interactivity).

What Does 'Cascading Style Sheets' Mean?

  • Cascading - when several rules target the same element, the browser uses a defined algorithm (the cascade) to decide which rule wins. It considers importance, origin, specificity and source order.
  • Style - the visual rules applied to elements.
  • Sheets - rules are usually stored in separate .css files that can be reused across many pages.

Why Learn CSS?

  • Separation of concerns - content stays in HTML, design stays in CSS.
  • Consistency - one stylesheet can style an entire website with thousands of pages.
  • Maintainability - change a brand color once and it updates everywhere.
  • Performance - cached CSS files load once and are reused.
  • Responsive design - one codebase adapts to phones, tablets and desktops.
  • Accessibility - good CSS supports readable text, sufficient contrast, focus styles and user preferences such as dark mode and reduced motion.

A Short History of CSS

YearMilestone
1994Håkon Wium Lie, working at CERN, proposes Cascading HTML Style Sheets. Bert Bos joins the effort soon after.
1996CSS Level 1 (CSS1) becomes a W3C Recommendation: fonts, colors, margins, text and basic box properties.
1998CSS2 adds absolute/relative/fixed positioning, z-index, media types and more selectors.
2000sBrowser inconsistencies (especially old Internet Explorer) make CSS hard; CSS 2.1 later fixes and clarifies the spec.
1999 onwardCSS3 is developed as independent modules (selectors, backgrounds, borders, transitions, animations, media queries).
2010sResponsive design, Flexbox, CSS Grid and custom properties (CSS variables) reach browsers and transform layout.
2020sModern features arrive: cascade layers, container queries, the :has() selector, native CSS nesting, color-mix(), subgrid and view transitions.

Note: there is no 'CSS4' officially. CSS is now developed as a living set of modules, each with its own level, maintained by the W3C CSS Working Group.

  • CSS Flexbox and CSS Grid for modern layouts.
  • CSS variables (custom properties) for themes and design tokens.
  • Responsive design with media queries and container queries.
  • Dark mode using prefers-color-scheme.
  • CSS nesting and the :has() selector ('parent selector').
  • CSS animations and transitions for micro-interactions.
  • Utility frameworks such as Tailwind CSS, and component libraries like Bootstrap, which are all built on core CSS.

Your First CSS Example

Below, HTML provides a heading and a paragraph, and CSS styles them. Edit the values in the live editor and watch the result change instantly.

Three Ways to Add CSS (Preview)

  1. External stylesheet - a separate .css file linked with the link element (recommended).
  2. Internal stylesheet - a style element inside the HTML head.
  3. Inline styles - the style attribute on a single element (use sparingly).

You will set these up step by step in the workspace lesson.

Common Beginner Mistakes

  • Thinking CSS is a programming language. It is a declarative styling language: you describe the result, not the steps.
  • Mixing content and design by overusing inline styles.
  • Not testing in more than one browser or screen size.

Key Takeaways

  • CSS controls the visual presentation of HTML.
  • The cascade decides which rule wins when rules conflict.
  • CSS evolved from simple text styling (1996) to a full layout and design system with Flexbox, Grid, variables and container queries.
  • Learning core CSS first makes frameworks like Tailwind and Bootstrap much easier.
Try it Yourself HTML
Output

Press Run to execute.

Try it Yourself HTML
Output

Press Run to execute.

Try it Yourself HTML
Output

Press Run to execute.

Exercise: Style Your First HeadingHTML

Using the starter code, make the h1 text color tomato, set its font-size to 40px, and center it with text-align: center. Then make the paragraph text color gray.

Try it Yourself HTML
Output

Press Run to execute.

Show expected output
A centered, 40px tomato-colored heading and a gray paragraph.

This is a self-check — compare your result with the expected output above.

Was this page helpful?