CSS Introduction
CSS stands for Cascading Style Sheets. It controls how HTML elements look: colour, size, spacing and position. HTML provides the structure, CSS provides the appearance.
A CSS rule has a selector (what to style) and a block of declarations (how to style it) inside curly braces. Keeping style in CSS means you can change the look of a whole site from one place.
Example
<style>
h1 {
color: darkgreen;
text-align: center;
}
</style>
<h1>Styled heading</h1>Exercise
Make all paragraphs blue.
p { : blue; }
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.