Enter your email id to get regular update free
Your Email

What is HTML CSS and why to use it?

CSS stands for Cascading Style Sheets.

It tells that how HTML elements are to be displayed on screen, paper, or in other media.
It saves a lot of work and can control the layout of multiple web pages all at once.
CSS can be added  in 3 ways: 
1. Inline 
1.Inline CSS
An inline CSS is used to apply a unique style to a single HTML element and it  uses the style attribute of an HTML element.
<h1 style="color:red;">This is a  Heading </h1>
2.Internal CSS
An internal CSS is used to define a style for a single HTML page.It is define in the head  section of an HTML page within a style element.
body {background-color: blue;}
h1 {color: green;}
 p {color: red;}
3.External CSS
An external style sheet is used to define the style for many HTML pages. 
Using an external style sheet look of an entire web site can be changed by changing one file.
To use an external CSS add a link to it in the head section of the HTML page.
<link rel="stylesheet" href="styles.css">

An external style sheet can be written in any text editor. 
The file should not contain any HTML code and should be saved with a .css extension.
Tech writer at newsandstory
Total 97 views