Inserting Horizontal Lines

Horizontal lines can be useful as dividers between sections of text in a Web page. For example, in the preceding exercise, you created a copyright notice that blends in perhaps a little too well with the rest of the text on the page; it would stand out more if separated from the rest of the document by a horizontal line. You might also want to add another horizontal line between the first headings and the rest of the document.

Inserting Horizontal Lines

To add a horizontal line, simply add the following one-sided code where you want the line to appear:

<hr />

The closing space and slash are optional in HTML, but required in XHTML, so it’s a good idea ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.