Beginning HTML5 and CSS3 For Dummies
Book image
Explore Book Buy On Amazon

Any HTML document can include style information written using CSS markup. Nevertheless, most web developers isolate CSS markup in separate style sheet documents and use links to those independent external style sheets in their web pages (HTML documents).

This technique helps keep content separate from presentation, encourages reuse of style sheets, and makes it easy to update presentation for multiple pages by editing the style sheets they reference rather than having to incorporate changes into a whole raft of web pages.

Another important advantage to this approach is that it encourages use of standard style sheets where local customization comes from reference to local style sheets.

Building a style sheet requires some knowledge of the HTML elements that will appear on your web pages, and it requires you to define properties and values to manage how those elements will look and where they should be positioned on those pages.

CSS offers incredible control over presentation, which in turn requires extensive testing and tweaking to get things just right. Furthermore, CSS permits classes or unique identifiers to be used, so you can associate a set of style rules with a single type or even a single instance of an HTML element on your pages.

Thus, you can define basic style rules for entire HTML elements and then override them with specific rules for things such as page headers, page footers, certain types of paragraphs, and even individual instances of HTML elements. This provides incredible power over layout, look, and feel on web pages.

About This Article

This article is from the book:

About the book authors:

Ed Tittel is a 30-year veteran of the technology industry with more than 140 computing books to his credit, including the bestselling HTML For Dummies.

Chris Minnick runs Minnick Web Services. He teaches, speaks, and consults on web-related topics and has contributed to numerous books, including WebKit For Dummies.

This article can be found in the category: