id: 1
Category: CSS
Rated:
CSS stands for Cascading Style Sheets. It was created to edit the properties of HTML/XHTML tags found on your page. It makes it much easier to work with changing colors etc. of any tag on the page. You no longer will have to write a long HTML/XHTML code with all the properties inside the tag itself.
It is more reliable then pure HTML/XHTML. IDs (identifiers) and classes are also something used to make HTML/XHTML easier to work with. (IDs and Classes are not well discussed in this tutorial. It will have it's own tutorial.)
CSS is meant to work with HTML/XHTML, so if you don't know HTML/XHTML you can't really use CSS. There are a few things which are similar with the two, though really it’s not too much:
* Edit properties.
* Has a start and ending tag.
Yea, not too many similarities, but now lets see the differences:
* CSS effects the entire page. HTML effects a small area only inside the tags you have placed a property in.
* CSS starts with <Style type="text/css"> and ends with </Style>
* CSS is used to modify the properties of HTML/XHTML tags.
* When you want to change a property, lets say you want to make all bold text white you'd have to add:
b{
color:white;
}
Let's take a look now at a basic code.
<style type="text/css">
b{
color:white;
}
</style>
But what does this look like?
<html>
<head>
<style type="text/css">
/*your css code here*/
</style>
</head>
<body>
content here
</body>
</html>
b{ The <b> (bold tag) is being changed here. In CSS you put the tag in this place without the brakets. { Tells the browser basiclly "properties for bold tags are starting now.".
color:white; Color will be the color of the text inside the bold tag. After { You start to list your properties.This can include color, font-size, font-family, padding, margin, etc
} Like { tells the browser "Properties start here", this tells the browser: "Properties of bold tag end here
</style> ends the style tag.
CSS is pretty easy to learn. You can learn the basics within a day or two but mastering it may take a little longer. CSS will make your site more appealing, and you'll find HTML/XHTML so much easier because you won't have to write out all the tags for changing colors or font styles.


