Ticker

6/recent/ticker-posts

What is CSS ? Type of CSS ?

CSS

CSS Cascading Style Sheet 

CSS:       Describes how HTML elements are to be displayed on the screen, on paper, or in other media.

HTML:    What do display
CSS : How to display

Syntax : p{
color:blue;
font-size :12px;
}

How to add CSS


Three-way to insert CSS


1 External CSS: 

suppose if we create one file with extension .html and another file with extension .css. if we want to attach both files (i.e link CSS in HTML file ). This is known as external CSS.
To link css  {{ <link rel="stylesheet"type="text/css" href ="style.css"> }} write this line in html file.
"style.css" - It is the file name.
If we write two styles in External CSS for the same element, then the second style will be applied.


2 Internal CSS :
In Internal CSS, we write
<style>

p { color : red}
</style >
in HTML file within the head tag for the whole webpage.
It is not compulsory to write in the head tag. But writing in Head tag is good for practice.
If we write two styles in Internal CSS for the same element, then the second style will be applied.

3 Inline CSS: 

the writing style in the particular element is Known as Inline CSS.



Post a Comment

0 Comments