DEV Community

loading...
Cover image for CSS: The Outer layer of Web Dev.

CSS: The Outer layer of Web Dev.

denglekaustubh profile image Kaustubh Dengle ・2 min read

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.

With CSS

Without CSS

(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.
Demo

Advantages of CSS

  1. Easy to understand and write.
  2. Improves webpage readability and presentability.
  3. Making changes is easy and hence easier management.
  4. Consistency in webpage design is achieved.
  5. Stylesheet can be coded in a different file, reducing the HTML file size and hence helps in faster webpage loading.
  6. Transitions and animations can be added with ease that make the webpage attractive.

Disadvantages of CSS

  1. Cross-browser issues can occur.
  2. 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!

Discussion

pic
Editor guide