CSS Introduction
CSS is the language we use to style an HTML document. It describes how HTML elements should be displayed.
What is CSS?
- CSS stands for Cascading Style Sheets.
- CSS describes how HTML elements are to be displayed on screen, paper, or in other media.
- CSS saves a lot of work. It can control the layout of multiple web pages all at once.
- External stylesheets are stored in CSS files.
Why Use CSS?
CSS is used to define styles for your web pages, including the design, layout, and variations in display for different devices and screen sizes. Before CSS, all styling had to be included directly in the HTML markup, which was cumbersome and made maintenance very difficult.
CSS Example
Example
css
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}Test Yourself with an Exercise
What does CSS stand for?