← Back to CSS
01

Introduction to CSS

Understand what CSS is, how it fits into the frontend stack and how to use the examples and challenges in this course.

📘 Theory

The basic idea behind CSS

HTML provides structure. CSS controls presentation.

A selector targets one or more elements, such as a tag, a class or an id. Inside curly braces you write declarations like `color: #2563eb;` or `font-size: 1rem;`.

When more than one rule affects the same element, the browser resolves the conflict through the cascade. That is why reusable classes such as `.btn` or `.card` tend to scale better than scattered one-off styles.

  • Selector + `{ property: value; }`
  • The cascade combines order, specificity and importance.
  • Reusable classes make styling easier to maintain.

How CSS is connected to HTML

The standard approach is an external stylesheet.

1

The most common setup is a `` inside the HTML head. This keeps structure and presentation separate and allows you to reuse the same stylesheet across multiple pages.

2

For quick tests, a `` block inside the head is enough. In tools such as CodePen, the CSS panel acts like that external stylesheet.

What you will learn in this course

A clear roadmap helps you build confidence in the right order.

The course starts with tooling, syntax, the cascade and selectors. Then it moves into the box model, units, color, typography, layout systems, responsive design and more advanced architecture topics.

  • Setup and tools for writing and inspecting CSS.
  • Syntax, selectors, cascade and specificity.
  • Box model, spacing, units and color systems.
  • Typography, responsive design and media queries.
  • Flexbox, Grid, transforms, animations and scalable patterns.

How to use the examples and challenges

Experiment first, then validate what you learned.

1

Every lesson includes editable code blocks. Change a selector, tweak a spacing value or switch a layout property and watch what happens in the preview.

2

Challenges are there to help you prove you understood the concept. Try them before revealing the solution, and compare your result with the recommended answer instead of copying it blindly.

🧭 Key visuals

CSS course map

Use it as a quick mental map before diving into individual lessons.

Visual roadmap of the CSS course with foundations, layout and advanced topics.

HTML, CSS and JavaScript as frontend layers

Useful here as a bridge before focusing on CSS as the presentation layer.

Visual relationship between HTML, CSS and JavaScript in frontend development

HTML versus CSS

It helps learners separate structure from presentation right at the start of the course.

Visual comparison between the role of HTML and CSS in a web page

🧪 Learn by doing

Example A first CSS rule Apply a style to a heading and a paragraph, then tweak the values to see how the page changes.

🧰 Resources

What is this?

I'm Cristian Eslava and I sometimes build websites so both you and I can learn and experiment. culTest

I made this in February 2026 to make learning easier for my students. The idea is to learn web development by practicing and to keep expanding the project with new topics, tests and challenges.

It draws inspiration from MDN, W3Schools, CodePen, Manz and many other web development references. I wanted to combine useful theory, runnable examples, challenges and the testing system I had already built for culTest. culTest

If you liked it, if you didn't, or if you want to get in touch, write to me at cristianeslava@gmail.com