Introduction to CSS
Here you can learn what CSS is and how it can benefit you.
What is CSS?
Every beginning or prospective webmaster knows about HTML because HTML is the basic code used to create web pages. Over the past couple of years though most beginning webmasters have heard people make references to CSS, or "style sheets", and how great it is. Well, they are right. CSS, which stands for "Cascading Style Sheets", is a way to define how to display HTML elements on a web page. CSS code is usually stored in a separate CSS file and your HTML or PHP pages reference the CSS file to determine what kind of formatting is required. A CSS file is a normal text file with a ".CSS" extension. All major browsers support Cascading Style Sheets and you can reference more than one style sheet from a single HTML/PHP page. To create a CSS file just create a text file and upload it to your site and change the extension to "css". Or you can just rename the file in Windows.
Why should I use it?
One reason is that it will save you tons of time. If you don't want to learn PHP and some of the other coding languages that's fine, but if you are going to learn HTML you have to learn CSS because they work together and compliment each other so well. The reason they save so much time is that you can define a format for a certain HTML element and have that format apply to an infinite number of elements. Then if you want to change the format of that element you just change one line of code in the CSS file. In other words, you can globally format elements from a single location. For example you'll probably want all your regular hyperlinks to have the same format. A second reason is that you can format elements with CSS in ways you can't with HTML - like line-height and letter-spacing.
Tables vs CSS
Since the beginning of the web, HTML was not only used to format HTML elements but it was also used to structure the layout of the page by using tables. After CSS was created it was used to format individual HTML elements but only recently has CSS been used to create the layout of a web page. As a beginner you will definitely want to learn how to do your layouts with CSS because CSS is much more efficient for doing layouts as well as the fact that official coding specifications are also moving in that direction.
Comments:
 |
please post comments
|
 |
admin November 21, 2006
|
|