EXTERNAL CSS:-
EXTERNAL CSS:-
1.in this type of CSS is used to create outside the HTML the page
2.external CSS is to saved .css extention
3.external CSS can not used tag symbol
.myone
{
color:red;
}
.mytwo
{
color:yellow;
}
.mythree
{
color:blue;
}
NOTE:- 1.CSS FILE CAN NOT EXECUTED
2.CSS FILE ONLY CONNECT TO HTML PAGE.
HOW TO CONNECT EXTERNAL CSS TO HTML PAGE:-
1.in this concept using <link>
there are following attributes used in <Link>.
1.href
2.rel
3.type
1]]]] EXAMPLE NO.1
CSS FILE :-
.myone
{
color:red;
}
.mytwo
{
color:yellow;
}
.mythree
{
color:blue;
}
HTML FILE:-
<html>
<head>
<link href="my.css" rel="stylesheet" type="text/css">
</head>
<body>
<font class="myone">welcome </font>
<br>
<font class="mytwo"> NAGPUR </font>
<br>
<font class="mythree"> MUMBAI </font>
</body>
</html>
2]]]] EXAMPLE NO.2
CSS FILE:-
.my1
{
color:red;
}
.my2
{
color:blue;
}
.my3
{
color:yellow;
}
.my4
{
background-color:red;
height:100px;
width:100px;
top:1px;
left:1px;
}
HTML FILE:-
<HTML>
<HEAD>
<LINK HREF="NEW.CSS" REL="STYLESHEET" TYPE="TEXT/CSS">
</HEAD>
<BODY>
<FONT CLASS="MY1">WELCOME </FONT>
<BR>
<FONT CLASS="MY2"> NAGPUR </FONT>
<BR>
<FONT CLASS="MY3"> MUMBAI </FONT>
<br>
<div class="my4"> PUNE </div>
</BODY>
</HTML>
ASSIGMENT:-
convert all div assignment into external CSS.
DOUBT POINTS FOR MONDAY
Comments
Post a Comment