Flylib.com

Books Software

 
 
 

Next Steps

Next Steps

Well, you’ve got a lot of theory under your belt now. You not only understand the value of structured markup as studied in Chapter 1, but you’ve got a thorough view of the fundamental issues in CSS.

The time has come to start practicing! In Chapter 3, you’ll go through numerous exercises that are mapped to the theory in this chapter. This way, the theory doesn’t remain amorphous. You’ll study how to prepare a CSS document, write, classify, and group rules effectively, and use a range of selectors and properties so as to see the way they really work. You’ll also learn about CSS validation, which can be very helpful to you when learning CSS.

Chapter 3: Writing CSS

Overview

It is not what you put on the canvas that the reader sees.
—Elie Wiesel

So far, you’ve read a lot of theory and semantics—all important, but not very gratifying in terms of results! In this chapter, you’ll have a chance to apply your newfound knowledge hands-on. While the focus here is primarily to get you used to authoring organized markup and CSS, you will get a chance to explore some CSS properties and apply style with more depth.

In this chapter you will learn:

  • How to prepare your markup for CSS

  • Writing rules

  • How to validate your CSS

Validating Your CSS

Just as you validated an HTML document in Chapter 1, “Understanding Structured Markup,” here you will validate your CSS document using the W3C’s validator. To do so, follow these steps:

  1. Point your browser to http:// jigsaw .w3.org/css-validator/ (see Figure 3.12).

    click to expand
    Figure 3.12: The W3C’s CCS validator

  2. As with the HTML and XHTML validator, you can validate in several ways, including by URI (if the document is online), and by upload.

  3. Click the option you’d like. If you choose by URI, you’ll be asked for the location of the document. If you choose to upload it, you’ll be asked to browse for the document or type its path directly into the available text box.

  4. Click the Submit This CSS File for Validation button.

The W3C’s CSS validator will validate your CSS. As with HTML and XHTML, warnings can be generated. As long as no errors are generated, the CSS document is valid (see Figure 3.13).

click to expand
Figure 3.13: The style sheet passes validation! The full style sheet will be displayed as you scroll down the page.

Note 

 If you do encounter an error, use the information provided to correct your document. A warning can provide helpful information to you, but warnings do not influence the validity of the document.

Next Steps

This chapter helped you begin writing style rules in a clear, organized, and effective manner. The next step is to dig deeper into using CSS to create great typographic style.

In Chapter 4, you’ll learn general features of CSS type, such as how to use multiple type styles within a document. You’ll also gain insight into creating readable, usable pages and learn to control a wide range of typographic features using style.

Part II: Design

In This Part:

Chapter 4: CSS Typography
Chapter 5: Color , Backgrounds, And Borders
Chapter 6: Working With CSS Layouts

Its one challenge to learn CSS as a language, its another test to put it to good use in visual design. That test is yet to be written much less taken—CSS as a language of design is just beginning to emerge.

With a strong foundation of technological principles beneath you, the aesthetic work can now begin. Type, shape, space, color, layout—Design comprises many aspects of the visual realm, and CSS allows you to address many of these aspects with considerable ease.

Learning the design topics discussed in the following chapters will help you be prepared for—and master—the ways you can apply CSS to your pages, making them more innovating and interesting than ever before.