Table of Contents

CSS Introduction

Table of Contents

What is CSS?

CSS, or Cascading Style Sheet is a language which describes the style of an HTML documents. It tells the browsers about the styles of an HTML elements.

It can control the style of multiple pages all at once.

CSS can be used in HTML in three ways:

  1. External Stylesheet
  2. Internal Stylesheet
  3. Inline Stylesheet

Why we should use CSS?

Using CSS we can make our web pages look more beautiful and attractive. It helps in making a website responsive for all sized devices.

In this series of tutorials we will learn this CSS (Cascading Style Sheet) from baics to advanced level.

You can use our free online HTML editor to edit and run your codes.

CSS Example:

body {
    background-color: lightyellow;
h1 {
    color: green;
p1 {
    color: blue;

Development of CSS

After the introduction of <font> like tags and color attribute in HTML 3.2, it become difficult for developers to code large website because of increased duplicacy task at every webpage.

Then the World Wide Web Consortium (W3C) created CSS, which reduced the headache of developers.

Saving a CSS stylesheet

All the style codes are saved in a file with an extension .css.

This is an external CSS file, now we can change the style of entire website by making changes in a single file.


Copyright 2023-24 © Open Code