What is CSS?
CSS stands for Cascading Style Sheets. CSS is used for the purpose of making a webpage beautiful and attractive. CSS defines how the HTML elements will be displayed on the screen.
CSS saves lots of time when used externally because it can control multiple page layout at once. Using CSS we can:
- Change size and color of text
- add background color to any HTML element
- Create colorful boxes
- add margin and padding to the elements
- Design layout
- Effects like animation,hover etc.
CSS provides powerful control over HTML documents. It is also easy to learn and understand.
CSS3 is the latest version of CSS. The latest version of CSS is a combination of old version + some new specification like: media query,namespace,selector etc.
history of CSS
CSS was developed by Håckon wieum lie and was first proposed on 10th oct, 1994. In that year Microsoft's Internet Explorer 3 was released with very limited support of CSS.
In those days browsers were unable to add complete CSS and also had bugs. It took more than 3 years when any browser reached full implementation of CSS.
CSS version :
- CSS 1 - Published on 17th dec,1996.
- CSS 2 - Developed by W3C published in may,1998.
- CSS 2.1 - W3C finally published it on 7th june, 1998.
- CSS 3 - Earliest draft of CSS3 was published in june,1999.
Advantages of CSS
- Easy to maintain - If you want to change any kind of styling just go to styling,change and all your elements will adjust according to new change.
- Faster page loading - Before CSS tags like color,border,size,font etc were repeated many times which leaded to slower loading.But by using CSS we need to mention property and value just once.
- High Control - We can control the style of the whole website using a single CSS page.Change just once here and the whole website shows your changes.
- Multiple device friendly - Using CSS we can create pages that can adjust its decorations according to the device.