What is CSS?
CSS basically translates to Cascading Style Sheets.
It is used to make an ordinary HTML code look beautiful, more presentable and appealing to the eye.
Consider this example and compare a program to your body: then JavaScript is the Brain, HTML is the Bones and muscles whereas CSS is the skin which is the outermost layer of your body.
CSS was introduced in 1996 and it gained popularity in the early 2000's. The latest version (CSS3) was made available in 1998 and was last updated in 2008. Till now it remains the most popular stylesheet language and preferred by many programmers all over the world.
Why CSS?
CSS is extremely important to make the webpage look good and artistic. Compare the two images below (taken from this editing page itself). One is with CSS and other is with CSS deactivated.
(How to deactivate CSS from any website: Add the following extension to chrome.)
The above images show the drastic changes a CSS code can make to a program.
Getting started with CSS
If you are new to the world of web designing, the best way to learn about CSS is to inspect any website that you visit. Right click on any webpage element like a nav bar, or a button and select the inspect option(for chrome). Inspecting it can help you understand how CSS and HTML work in unison. Check how classes
and id's
are used with the HTML code. You don't need to memorize every CSS property and Value, instead try including those you see in your own basic webpage design. This will surely help you to get a basic idea. Learn how to link your CSS stylesheet to your HTML code using the <link>
property.
Advantages of CSS
- Easy to understand and write.
- Improves webpage readability and presentability.
- Making changes is easy and hence easier management.
- Consistency in webpage design is achieved.
- Stylesheet can be coded in a different file, reducing the HTML file size and hence helps in faster webpage loading.
- Transitions and animations can be added with ease that make the webpage attractive.
Disadvantages of CSS
- Cross-browser issues can occur.
- Can't interact with databases or perform logical operations. Here Javascript is essential.
Summary
So we can conclude that CSS is important and needed if you don't want your webpage to look bland and dull. CSS adds life to your webpage. It is a very effective tool, which if mastered, can be extremely useful to show your artistic side in the field of web development.
Thanks for reading!
Top comments (0)