02 - What is CSS

If you know HTML then you might have heard about CSS. So, in this chapter you will learn more about CSS.

CSS is Cascading Style sheet, a great tool to simplify the process of controlling and styling the look of the web pages.

Why is it called Cascading?

Cascading is passing on something to others. Here, it means the style sheet with highest priority (you will learn about all this in our 4th Chapter How to add CSS?) gets importance and the content is displayed according to those style rules. If they are not set, then the priority is passed onto another method. This method is called Cascading. Cascading is a type of conflict resolving mechanism which works according to the rules of CSS.

More about CSS

CSS is the medium through which we can inform the browser how we want our text or content to be displayed. Through CSS, we can define how to render the HTML elements like paragraphs, tables, list etc in a more stylish and appealing manner.

Since the technologies are always evolving, there have been and will be different versions of CSS. We have CSS1, CSS2 and CSS3. CSS4 is the current latest specification.

We will learn about CSS1 and CSS2 in this tutorial and CSS3 in another exclusive tutorial. As, CSS simplifies the process of applying styles, we simplify your process of learning in a simple yet productive way.

Jumping to the actual topic, back in good olden days when Tim Berners Lee invented web , HTML was only used to define text like, this line goes into heading( enclose it within <h1> and </h1> tags) and this is a paragraph( add a <p> tag for the paragraph). So, all was well until the developers started misusing our HTML, by using tables to lay out the content  and some browser developers started creating their own tags which were only made self compatible( sounds selfish isn’t?).

So, then came savior, the CSS to create harmony within the web developers fraternity. And guess what? Our hero came out with flying colors and sequels are made to update him with the fast evolving trends of web.

Why you should use CSS?

  • Easy to maintain

              To update a change simply change the style file and the elements in all web

              Pages will be updated automatically.

  • Page loads Faster

Since the style rules are written in another file, the page loads faster. Less code means more speed.

  • Write once and use many times

You can use the same style sheets for any number of web pages. This saves a lot of time.

  • Better look than HTML

The CSS has wide variety of attributes than HTML. So, we have many options to style our elements.

  • Compatible with future browsers

Use CSS to make your code compatible with the future browsers.

In the next chapter, we will learn more about CSS.

Like us on Facebook