O'Reilly logo

Internet & World Wide Web: How to Program, Fifth Edition by Abbey Deitel, Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4. Introduction to Cascading Style Sheets™ (CSS): Part 1

Fashions fade, style is eternal.

—Yves Saint Laurent

How liberating to work in the margins, outside a central perception.

—Don DeLillo

Objectives

In this chapter you’ll:

• Control a website’s appearance with style sheets.

• Use a style sheet to give all the pages of a website the same look and feel.

• Use the class attribute to apply styles.

• Specify the precise font, size, color and other properties of displayed text.

• Specify element backgrounds and colors.

• Understand the box model and how to control margins, borders and padding.

• Use style sheets to separate presentation from content.

Outline

4.1 Introduction

4.2 Inline Styles

4.3 Embedded Style Sheets

4.4 Conflicting Styles

4.5 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required