Sunday 12 January 2014

external style sheets

steps
1. go to your folder
2. open any note pad
3. type the following
p
{
 color:chocolate;
 font-size:12pt;
 font-weight:bold;
 text-align:justify;
}
.question
{
 color:brown;
 font-style:italic;
}
.ans
{
 text-transform: uppercase;
color: #093;
text-decoration: blink;

}
.big
{
 font-size:14pt;
 text-decoration:underline;
 text-transform:uppercase;
 color:red;
}
4. save with .css extension. ex: one.css
5. create another note with same folder
6. type the follwing html program and use <link> tag to give link to css file (one.css)

<html>
 <head>
  <title>External</title>
  <link rel=stylesheet type="text/css" href="one.css">
 </head>
 <body>
 <h1 class="big">S R ENGINEERING COLLEGE</h1>
 <p class="question">ananthasagar </p>
 <p class= "ans">Hasanparthy</p>
 <p>warangal</p>
 <p>Andhrapradesh</P>
</body>
</html>

No comments:

Post a Comment