Chapter 10. Styling with Cascading Style Sheets

In This Chapter

  • Getting familiar with the CSS syntax

  • Creating inline, internal, and external CSS

  • Understanding CSS selectors

In earlier chapters of this book, you discover that Cascading Style Sheets are really the way to go when it comes to styling the content on your pages. Yet until now, I haven't gotten into the nuts and bolts of how to create and apply CSS to your HTML. That's what this chapter is all about.

To make the task of finding out about styling pages with CSS flow as smoothly as possible, this chapter breaks CSS down into several easily digestible parts. First, you read about the anatomy of the CSS style syntax. Then you discover the difference between inline, internal, and external style sheets and find out how to link an external CSS to an HTML file. After that, you find out the basics of creating custom styles, redefining default tag styles, setting up ID styles, and using compound CSS styles to style several tags at once. Plus you find out how to create custom link styles for various sections within your Web page.

Styling with Cascading Style Sheets

Understanding CSS Basics

Back in the late 1990s, a tool called Cascading Style Sheets was developed as an enhancement to traditional HTML markup that enabled designers to place the styling information for an entire Web site into a single, centralized external document, thereby decreasing the file size of all the ...

Get Web Design All-in-One for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.