selector identifies what portion of your web page gets styled. Within a selector are one or more properties and their values. Read more on selecters next post , read more about CSS Selectors
property tells the browser what to change and the value lets the browser know what that change should be.
For example, in the following declaration block example, the selector tells the browser to style the content marked up with the h1 element in the web page to 150% of the default size: read more about CSS Properties
Declarations are always formatted as the property name, followed by a colon, followed by a value, and then a semicolon. It is common convention to put a space after the colon, but this is not necessary. The semicolon is an indication that the declaration is concluded. Declarations are grouped within curly brackets, and the wrapped group is called a declaration block.
h1 {
font-size: 150%;
}
selector {
property: value;}
Property is a font-size, text-decoration, font-color, font-size etc.
Value is a 150%, underline, blue, 90% etc.
Try this Example for selectors and properties
If you do want to embed a style sheet, use code like this in the head element of your (X)HTML document:
<html>
<head>
<title>CSS webaegis.in</title>
// This is how we use CSS inbound
<style type="text/css">
<!--
body {
font-family: verdana, arial, sans-serif;
}
h1 {
font-size: 120%;
}
a {
text-decoration: none;
}
p {
font-size: 90%;
}
-->
</style>
</head>
<body>
<h1>Title of Page</h1>
<p>This is a sample paragraph with a
<a href="http://webaegis.in">link</a>.</p>
</body>
</html>
No comments:
Post a Comment