Pre (HTML element)

From Wiki @ Karl Jones dot com
Jump to: navigation, search

In HTML, the pre element represents a block of preformatted text.

Description

Some examples of cases:

This element is used with the code element, the samp element, or the kbd element, and so on, according to the kind of content inside a pre element.

The author should consider web accessibility, when use the pre element. This is because, when speech synthesizers, braille displays, and the like is used, there is a possibility that preformatted text is destroyed. For example, for cases like ASCII art, it is likely that an alternative presentation, such as a textual description, would be more universally accessible to the readers of the document.

Examples

Line 1.
   Line 2 is to the right of line 1.
   Line 3 aligns with line 2.

See also

External links