• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part II: XHTML Style and Structure > Using Cascading Style Sheets with XHTML

Chapter 11. Using Cascading Style Sheets with XHTML

The last chapter introduced you to XHTML 1.1, where all presentational elements and attributes have been removed from the language. Of course this doesn't mean that Web pages created using XHTML 1.1 will be dry, text-only documents. Instead, it means that presentation and style must be applied to the document in some manner other than with XHTML. That job now falls to a document known as a style sheet.

Style sheets can be written in a number of languages. In this chapter, we'll review one that might be familiar to you: Cascading Style Sheets (CSS). CSS first became popular as an adjunct to HTML. Today, it can still be used with XHTML and has the benefit of familiarity among many Web developers. This chapter is not intended as a comprehensive tutorial on developing style sheets. Such an endeavor could fill at least one book all by itself. Instead, you will review the syntax used to create style rules, review the different selectors available to bind styles to elements or instances of elements, and take a quick tour through some commonly used style properties.

This chapter teaches you:

  • The syntax of a basic style rule

  • How to create non-element selectors (class and ID)

  • How to use text styles

  • How to apply style within blocks


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint