CSS Introduction:-

CSS is a language used for styling websites.

What is CSS?

  • CSS stands for cascading style sheet.
  • CSS describes how HTML elements are displayed on the screen, on paper, or on other media.
  • CSS saves a lot of work. It can control the layout of multiple web pages all at once.
  • External style sheets are stored in CSS files.

Why use CSS?

CSS is used for styling web pages and making the website more attractive. CSS is used for designing, layout, and variations in display for different devices and screen sizes.


<!DOCTYPE html>

<html>

<head>

<style>

body{background-color: black;

}

h1{color: white;

text-align: center;

}

p{color: yellow;

font-size:30px;

font-family: Verdana;

}

</style>

</head>

<body>

<h1> This is heading </h1>

<p> This is a paragraph. </p>

</body>

</html>

Try this code for a better experience 


CSS Solved big problems:-

HTML was never intended to contain tags for formatting a web page.

HTML was developed to describe the content of the web page like,

<h1> This is a heading </h1>

<p> This is a paragraph.</p> 

When tags like <color> font attribute was added to HTML, it started a nightmare for a developer. Developing lot of websites putting styling in single line is very difficult and consuming lot of time and expense. If any issue occur then the finding the solution takes lot of time that's why we do not recommend usage of CSS in HTML.

CSS remove the styling formatting in HTML page.