2.6. Miscellaneous Block-Level Elements

The remaining block-level elements include HR for a horizontal rule used as a divider, DIV for setting up default alignments for other block-level elements, and CENTER for centering a section of text.

HTML Element: <HR ...> (No End Tag)
Attributes: ALIGN, WIDTH, SIZE, NOSHADE, COLOR (nonstandard)

Horizontal rules, indicated by the HR element, divide sections by drawing a horizontal “etched” line all or partway across the browser window. The following paragraphs summarize the five optional attributes, all of which are deprecated in favor of style sheets.

ALIGN ALIGN specifies the horizontal alignment. Legal options are LEFT, RIGHT, and CENTER, with CENTER being the default.

WIDTH This attribute gives the ...

Get Core Web Programming, Second Edition 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.