Get started With Cascading Style Sheets
Takeaway: Check out this introduction to Cascading Style Sheets (CSS).
By Matt Rotter, Charity Kahn, and Paul Anderson
HTML can be frustrating when you want to control the appearance of your Web page and its contents. Tables are awkward, frames are annoying, and FONT tags threaten to overwhelm your code. But for the first three generations of browsers, HTML was all you had to work with. Not anymore.
The truth is that HTML was intended to mark up only a Web page's structure and not how it displayed on the screen. For the appearance of Web pages, the World Wide Web Consortium (W3C) developed a complementary markup system called Cascading Style Sheets, or CSS, designed to make it easy to define a page's appearance without affecting its HTML structure.
Style sheets work like templates: you define the style for a particular HTML element once, and then use it over and over on any number of Web pages. If you want to change how an element looks, you just change the style; the element automatically changes wherever it appears. (Before CSS, you had to change the element individually, each time it appeared.) Style sheets let Web designers quickly create more consistent pages--and more consistent sites.
Browsers began supporting the first CSS Specification, Cascading Style Sheets, Level 1 (CSS1), in versions 3.0 of Opera and Microsoft Internet Explorer and in version 4.0 of Netscape Navigator. The 4.0 and later versions of all three browsers also support properties from the newer Cascading Style Sheets, Level 2 (CSS2) specification, which let you specify elements' visibilities, their precise positions on the page, and how they overlap one another.
To help you get started, we'll show you the basics of shaping your pages' appearance with CSS1 and positioning with CSS2. Of course, you'll need a 4.0 or later browser to see what we're doing, so if you don't have one, download one now.
Matt Rotter and Charity Kahn are software engineers for CNET.com.
White Papers, Webcasts, and Downloads
- Building the Virtualized Enterprise with VMware Iinfrastructure VMware VMware virtualization software has been adopted by over 120,000 enterprise ... Download Now
- VMware Infrastructure: A Guide to Bottom-Line Benefits VMware Frustrated by the high cost of maintaining or building ever-larger data centers? Get the facts you need to formulate your Virtualization Action Plan. Download Now
- Building the Virtualized Enterprise with VMware Infrastructure VMware This paper explains how adopting a virtual infrastructure -- comprised of server, storage, and networking virtualization technologies -- can help your organization build a sustainable competitive ... Download Now
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
- Tom Davenport Study: Linking decisions and information for organizational performance IBM Tom Davenport's new client study looks at approaches to linking ... Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET

