Bulleted lists in HTML

A bulleted list consists of one or more items each prefaced by a bullet (often a big dot; this book sometimes uses check marks as bullets). You use this type of list if the items’ order of presentation isn’t necessary for understanding the information presented. Formatting A bulleted list requires the following: ✓ The unordered list element (<ul>) specifies a bulleted list. ✓ A list item element (<li>) marks each item in the list. ✓ The closing tag for the unordered list element (</ul>) indicates that the list has...

read more

Horizontal HTML rules

Using a horizontal rule element (<hr />) helps you include solid straight lines (rules) on your page. The browser creates the rule based on the <hr /> element, so users don’t wait for a graphic to download.                                     A horizontal rule is a good option to ✓ Break a page into logical sections. ✓ Separate headers and footers from the rest of the page. Formatting When you include an <hr /> element on your page, as in the following XHTML, the browser replaces it...

read more

Creating Paragraphs in (X)HTML

Paragraphs appear more often than any other text block in Web pages. HTML browsers don’t recognize hard returns that you enter when you create your page inside an editor. You must use a <p> element to tell the browser to package all text up to the closing </p> tag as a paragraph. Formatting To create a paragraph, follow these steps: 1. Add <p> in the body of the document. 2. Type the content of the paragraph. 3. Add </p> to close that paragraph. Here’s what it looks like: <!DOCTYPE html PUBLIC “-//W3C//DTD...

read more