
CSS stands for Cascading Style Sheets. It is a stylesheet language that describes how HTML and XML documents are presented. CSS controls colors, typography, spacing, borders, and where elements appear on a page. If you are new to markup, start with the HTML tutorial or explore the XML tutorial in Spanish.
1. What is CSS?
The World Wide Web Consortium (W3C) develops CSS as part of its work on open web standards. Early versions were published as CSS1 and CSS2. Modern CSS is developed in modules, such as Selectors, Color, and Grid Layout. Each module has its own level and release history. Explore the W3C CSS resources for specifications and updates.

The course covers properties for colors, text, backgrounds, lists, and tables, as well as the box model that defines how spacing and borders work. Keep the CSS property reference in Spanish nearby as you work through the examples.
1.1. Checking browser support
A CSS feature may be supported in one browser and unavailable in another, particularly on older versions. Look up support before relying on a feature, then test the page on the browsers and devices your readers use.
- Can I use lets you compare feature support across browsers and versions.
- BrowserStack lets you test your pages on different browsers and devices.
- Chrome, Firefox, Safari, and Edge include developer tools for inspecting which rules apply to an element and trying changes in place.
- The W3C CSS Validator flags errors and reports warnings in a stylesheet.
For more suggestions, see CSS best practices.
1.2. CSS syntax
A style rule starts with a selector followed by a declaration block in curly braces. Each declaration pairs a property with a value, using a colon between them and a semicolon after the value.
/* Make the main heading stand out. */
h1 {
color: #23395d;
font-size: 2rem;
}
- The selector
h1matches the page’s first-level headings. - A property, such as
color, identifies what to change. - A value, such as
#23395d, specifies the new setting. - A comment starts with
/*and ends with*/. Browsers ignore it when applying styles.
Try it yourself
Write a style rule that makes every paragraph use a line height of 1.6. Then add a comment explaining your choice.
Show one solution
/* Leave enough space between lines for comfortable reading. */
p {
line-height: 1.6;
}