CSS
CSS
Types of Stylesheets:
1)Inline:
With in the element
Note: Syn=><h1 style=”color:red;”>Welcome</h1>
Style = attribute
Color = property
Red = value
2)Internal:
With in the page
Note:
<style></style> = element
Color, background-color = property
Red, yellow = values
Output:
3)External:
For multiple pages
Note: Syn=>
<head>
<link rel=”stylesheet” type=”text/css” href=”fil_name”/>
</head>
Selector:
1)Element:
Syn=>
h1{
color:red;
}
h1=element selector from html page
Color=property
Red=value
2)Id:(#)
Syn=>
(Css file )
Output:
3)Class:(.)
Syn=>
<h1 class=”demo”></h1> (need to write in Html file)
(Below code inside css file)
. demo{
Color:red;
}
4)Attribute