4 Formatting Your Web Page

 

This chapter covers

  • Styling the text font, size, and style
  • Aligning and indenting paragraphs
  • Adding text and background colors

You now know how to display important and emphasized text, create links and headings, and show items in bulleted or numbered lists, but although these important techniques give your web page a bit of visual interest, they won’t win you any design awards. To get people to sit up and take notice of your page, you need to concentrate on the CSS side of things for a bit, and that’s what you’ll do in this chapter.

First, you’ll learn a few ways to style your web page text, including specifying the typeface you want to use and setting the size of the text. You’ll also learn how to apply bold to any text (not only important terms or keywords) and how to add italic to any text (not only emphasized words or alternative terms). From words and phrases, you jump to paragraphs, learning how to align text horizontally and indent paragraph text. The chapter closes on a colorful note as you learn how to apply CSS colors to text and to the page background.

As you’ll see, these basic CSS techniques are straightforward to learn and implement, but don’t let their inherent simplicity fool you. These are powerful tools that you’ll use over and over to make your pages look great and to give them your personal touch. Those design awards are right around the corner.

Styling Text

Lesson 4.1:   Specifying a Generic Font

Lesson 4.2:   Specifying a System Font

Lesson 4.3:   Setting the Type Size

Working with Text Styles

Lesson 4.4:   Making Text Bold

Lesson 4.5:   Making Text Italic

Styling Paragraphs

Lesson 4.6:   Aligning Paragraphs Horizontally

Lesson 4.7:   Indenting Paragraph Text

Working with Colors

Lesson 4.8:   Applying Color to Text

Lesson 4.9:   Applying Color to a Background

Summary