So what are cascading style sheets? Do you remember in our study of HTML we learned that tags can have attributes and that attributes have values? Here are a couple of examples by way of review.
Let’s suppose for a minute that you wanted all your paragraphs in a multi-page document to be center-aligned. If you omit the attribute and value for the
tag, what do you think the browser will do? It will simply use its default setting, which is left-aligned. So, every time you create a new paragraph, you have to remember to type in the attribute and the value. If you forget, you document won’t look like you want it to look.
Now that would be no big deal if you only had to deal with one or two pages and one or two tags, but what if you are dealing with a website that has 50 pages and hundreds of different tags. Now we are talking about hours and hours and hours of work. That is when and where CSS becomes invaluable, and it is only one place that this technology is a real time and headache saver.
CSS was introduced in late 1996, as an elegant cousin to HTML that promised several things, including:
* more precise control than ever before over layout, fonts, colors, backgrounds, and other typographical effects;
* a way to update the appearance and formatting of an unlimited number of pages by changing just one document;
* compatibility across browsers and platforms; and
* less code, smaller pages, and faster downloads.
No comments:
Post a Comment