Publishers of technology books, eBooks, and videos for creative people

Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

More Properties

CSS provides quite a few more properties and selectors than we've been able to cover, but we've covered the most commonly used and widely supported features of CSS1 and CSS2. To give you a sense of what else you might want to investigate, here's a quick overview of some of the features we've left out.

Printing Properties

CSS2 features quite a few properties specifically for print styles—like widows and orphans, and page-breaking properties.

User Interface Properties

With CSS it's possible to style the outline of an element used when it has the focus. It's also possible to specify a cursor, using an image file URL or keywords for common cursor types.


There are a number of very specialized and not very popular types of selectors we haven't touched on in this chapter:

  • Language selectors, which select an element based on the value of an element's lang attribute, and allow us to style, for example, English text differently from Japanese text. For example, p:lang(en) selects a paragraph that has a lang attribute set to en.
  • Typographical selectors, which allow us to select the first letter or first line of a given element. We can select the first letter of a heading of level 1 with h1:first-letter, or the first line of a paragraph with the selector p:first-line.

Generated Content

With CSS, it's possible to add strings, various quotation marks, images, and the values of attributes, as well as complex numbering as "generated content" that comes before and after an element. We could, for example, add the value of an href attribute of a link when a page is printed after the link itself using this statement:

a[href]:after {
  content: attr(href)
  • + Share This
  • 🔖 Save To Your Account