• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Description

The <pre>...</pre> element defines a block of “preformatted” text. What this means, conventionally, is the browser treats carriage returns (your Enter and Return keys, typically) as line breaks, and spaces and tabs within the source code as spaces and tabs in the document itself. In other words, this element implies to the document to treat the contents almost literally.

Almost. The deprecated <xmp>...</xmp> element means literally; XML reinstates its equivalent with the <![CDATA[...]] > tags, which I describe in Chapter 20, “Core DOM Objects,” under CDATASection. Other markup elements, such as <em>...</em>, still apply to the contents of <pre>...</pre> elements.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint