22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 5-1: Web browsers delineate paragraphs<br />

with line breaks.<br />

Chapter 5: Text and Lists<br />

Sloppy <strong>HTML</strong> coders don’t use the closing tag when they create paragraphs.<br />

Although some browsers permit this dubious practice without yelling,<br />

omitting the closing tag isn’t good practice because it:<br />

✓ Isn’t correct syntax<br />

✓ Causes problems with style sheets<br />

✓ Can cause a page to appear inconsistently from one browser to another<br />

You can control paragraph formatting (color, style, size, and alignment) with<br />

Cascading Style Sheets (<strong>CSS</strong>), covered in Chapters 9–12.<br />

Headings<br />

Headings break a document into sections. This book uses headings and subheadings<br />

to divide each chapter into sections, and you can do the same with<br />

your Web page. Headings<br />

✓ Create an organizational structure<br />

✓ Break up the text flow on the page<br />

✓ Provide visual cues as to how pieces of content are grouped<br />

<strong>HTML</strong> includes six elements for different heading levels in documents:<br />

✓ is the most prominent heading (Heading 1)<br />

✓ is the least prominent heading (Heading 6)<br />

Follow numerical order from lowest to highest as you use <strong>HTML</strong> heading<br />

levels. That is, don’t use a second-level heading until you use a first-level<br />

heading, don’t use a third-level heading until you use a second, and so on. If<br />

you want to change how headings look, Chapters 10 and 11 show you how to<br />

use style sheets for that purpose.<br />

75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!