Formatted text

It is sometimes important to be able to control the way in which the browser formats a block of text into individual lines.

The Br (line break) element forces following text to be placed on a new line. This is very useful for semi-formatting text, such as lines of poetry. It is an empty element:

<P>Break this line here <BR>so this is line 2.</P>

The Preformatted element (Pre) composes the content in a monospaced font. All spaces and line-feed characters are retained, making it possible to use these characters to create simple character-based diagrams or columns of text. The Width attribute (now deprecated) can be used to give the browser a hint as to the maximum length of the lines of text, so that it can choose an appropriate ...

Get XSL companion, The 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.