# Introduction
# What is CSS?
- CSS is the acronym for Cascading Style Sheets.
- CSS describes how the HTML elements will be shown in the screen.
- CSS saves a lot of work. It can control and determine the design of many pages at the same time.
- External style sheets are saved in .css files.
# Why CSS?
CSS is used to define styles for your webpage, including the design and the variations for different screen sizes.
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}
# What problems does CSS resolve?
HTML was never made to contain style tags to give format to a webpage!
HTML was created to describe the content of a webpage:
<h1> This is an important title </h1>
<p> This is a paragraph. </p>
When <font>
tags and color attributes were added to HTML 3.2, a nightmare began for web developers. When writing big sites, fonts and color information added to each page made the process long and hassle.
In order to solve this problem, the World Wide Web Consortium (W3C) created CSS to eliminate style from HTML.
# CSS saves a lot of time!
Most of the time, styles are saved in external stylesheets - style.css files.
With an external stylesheet file, you can change the look of an entire website by just changing one file.