Ok... So lets understand the code we made in the previous post..
Now lets see the code...
<html>
<head>
<title>CSS Practise</title>
<style>
body{
font-family:"Comic Sans MS";
}
h1 {
text-align:center;
color:blue;
}
h2{
color:red;
}
p{
color:green;
}
</style>
</head>
<body>
<h1>This is a webpage all about rabbits</h1>
<h2>Many people love rabbits and I love them too...Do you?</h2>
<p>Rabbits are animals which have furry skin and they like to eat carrots...</p>
<body>
</html>
Now lets see the code...
body{
font-family:"Comic Sans MS";
}
This part tells that we want to style the body of the webpage....
we have used font-family which is used when we want to give a nice font to our text...as you can see I have given the font family "Comic Sans MS". You can keep your own font family!!!
This part tells that we want to style the body of the webpage....
we have used font-family which is used when we want to give a nice font to our text...as you can see I have given the font family "Comic Sans MS". You can keep your own font family!!!
h1 {
text-align:center;
color:blue;
}
This part tells that we want to style the h1 part of the webpage.....
We have used text-align to keep the text in the centre of the webpage
This part tells that we want to style the h1 part of the webpage.....
We have used text-align to keep the text in the centre of the webpage
h2{
color:red;
}
This part is used to give the text is color.... so this is just for now... we will do more further in the next post..:D
This part is used to give the text is color.... so this is just for now... we will do more further in the next post..:D

Comments
Post a Comment