Linking A:
1. Internal Stylesheet
<html>
<head>
<title><title>
<style type="text/css">
CSS Content Goes Here
</style>
</head>
<body>
</body>
</html>
2. External Stylesheet
<head>
<title><title>
<link rel="stylesheet" type="text/css"href="style.css" />
</head>
<body>
OR
<head>
<title><title>
<style type="text/css"> @import url(Path To stylesheet.css)
</style>
</head>
<body
CSS Syntax:
selector { property: value }
Types of selector in CSS:
1.General selector
2.Class selector
3.ID selector
1.General selector
We can use general selector in any part of the file.
Syntax:
Krrish {
color: Blue;
font-family: Georgia;
}
2.Class selector
We can use the same class selector again and
again within a file. note that a class selector begins with a (.) period.
Syntax:
.Krrish{
font-size: small;
color: #008080;
font-weight: bold;
}
e.g
<p>
To put it more simply, this <span
class="Krrish">sentence</span> you are reading is styled
in my CSS file by the following.
</p>
3.ID selector
I generally use IDs to style the layout elements of a page that will only
be needed once. id selector begins with a (#) number sign instead
of a (.) period.
Syntax:
#Krrish{
width: 80%;
margin: auto;
}
e.g
<div id="Krrish">
Everything within my document is inside this division.
</div>




No comments:
Post a Comment