What is CSS ?
CSS stands for Cascading Style Sheets.
– Cascading refers to the way CSS applies one style on top of another.
– Style Sheets control the look and feel of web documents.
CSS and HTML work hand in hand:
– HTML sorts out the page structure.
– CSS defines how HTML elements are displayed.
It is a design language that is used to design web pages. It was developed by Håkon Wium Lie on October 10, 1994. It provides a powerful technique for the presentation of HTML documents. It handles the look and feels part of a web page. It describes HTML elements and how to be displayed on the screen. It has various advantages like Page load fast, Save Time, Offline browsing, and many more. The latest version of CSS is CSS3.
CSS is the language for describing the presentation of Web pages, including colors, layout, size, and fonts, and its stands for “Cascading Style Sheets.” It describes how HTML elements are to be shown on screen, paper, web page, or any media.
Example
1 2 3 |
<html> <h1 style= “color:green;font-style:italic”> Hello World!</h1> </html> |
Output:
Hello World!
Explanation:
style= “color:green;font-style:italic”
is a CSS code, which specifies the text color as green and the font style as italic.
To understand CSS, you should already have a basic knowledge of HTML.
If you want to study HTML, check out our HTML course.
Why Use CSS?
CSS allows you to apply specific styles to specific HTML elements.
The main benefit of CSS is that it allows you to separate style from content.
Using just HTML, all the styles and formatting are in the same place, which becomes rather difficult to maintain as the page grows.
All formatting can (and should) be removed from the HTML document and stored in a separate CSS file.