3.2. An Introduction to CSS

In terms of syntax, CSS is an easy language to learn. Its "grammar" consists of only a few concepts. That makes it relatively easy to get started with. What makes CSS a bit more difficult is the way all major browsers render a page. While virtually every modern desktop browser understands CSS, they all have their quirks when it comes to displaying a page according to the CSS standard. This standard, maintained by the same organization that maintains the HTML standard, the World Wide Web Consortium, or W3C for short, comes in three different versions: 1.0, 2.1, and 3.0. From these three versions, 2.1 is the most applicable today. It contains everything that version 1.0 contained but also adds a lot of possibilities on top of that. It's also the version that VWD uses and generates by default. Version 3.0 is currently under development and it's expected to take some time before the major browsers have solid support for it.

Before you look at the actual syntax of CSS, it's a good idea to see an example first. In the next exercise, you'll write a simple ASPX page that contains some CSS to format the contents of the page. This helps in understanding the CSS language, which is discussed in full detail in the section that follows.

Try It Out: Writing Your First CSS

In this Try It Out you'll write some CSS that changes the appearance of a header and two paragraphs. You'll hand code the page for now; the second half of this chapter shows you how to use the CSS ...

Get Beginning ASP.NET 3.5: In C# and VB 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.