What’s this mess called CSS?

CSS is short for Cascading Style Sheets. It is a code language that describes how HTML should be displayed.

The simplest example of CSS looks like this:


Styles can be strung together like this:


When placed in an HTML document within <style> tags CSS looks like this:


body {color:blue;font-size:1.2em;font-family:arial;font-style:italic;}


According to the CSS Wikipedia page:

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language.[1] Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications.[2]

w3schools has a comprehensive CSS reference and tutorial

CSS is a stylesheet language that describes the presentation of an HTML (or XML) document.

CSS describes how elements must be rendered on screen, on paper, or in other media.

This tutorial will teach you CSS from basic to advanced.