Chapter 8

More Cascading Style Sheets

What You Will Learn in this chapter

  • Styling links
  • Setting document backgrounds
  • Styling bullet points and numbered lists
  • Changing the appearance of tables
  • Adjusting the outlines around boxes
  • Adding content to the HTML document before or after an element
  • Understanding three positioning schemes that enable you to determine where on a page a box appears

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=9781118340189 on the Download Code tab. The code is in the Chapter 8 download and individually named according to the names throughout the chapter.

In this chapter, you continue to learn how to use CSS to control the presentation of HTML web pages, starting with CSS properties that enable you to control the presentation of links, backgrounds, list styles, table styles, and outlines around boxes. You then learn a technique to add content to a page (even if it were not in the HTML document) using the :before and :after pseudo-classes. Finally, you see how to use CSS to position boxes on the page, which enables you to create attractive layouts for your pages.

Links

By default, most browsers show links in blue with an underline and change the color of links you have already visited, unless you tell them to do otherwise. The following are properties often used with links:

  • color: Changes the colors of the links
  • background-color: Highlights the link, as if it had been highlighted ...

Get Beginning HTML and CSS 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.