PRB: Placing a '<' Within <PRE> in IE3 Stops Display of HTML

Last reviewed: March 19, 1998
Article ID: Q182669
The information in this article applies to:
  • Microsoft Internet Explorer (Programming), versions 3.0, 3.01, 3.02

SYMPTOMS

Placing a less-than symbol "<" inside a pair of preformatting tags (<PRE></PRE>) causes the HTML to stop displaying at the point where the "<" is listed in Internet Explorer (IE) 3.0x.

RESOLUTION

To work around this problem, either use <XMP> instead of <PRE> or use &lt instead of "<". Please note that <XMP> is considered obsolete by the World Wide Web Consortium (W3C) and may not be supported in future versions of Internet Explorer.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Text placed within a preformatted section of HTML using <PRE> is usually displayed as-is, without any formatting. If the Web page that contains this preformatted text contains a less-than symbol (<) and the page is displayed in Internet Explorer 3.0x, IE will stop displaying the HTML on the Web page when it reaches the "<". Any HTML that is after the "<" will not be displayed, even if it is outside of the preformatted section.

For example, in IE 3.0x the displaying of this HTML will stop at the "<":

   <HTML>
      <BODY>
         <PRE>
            Some preformatted text
            x < y
         </PRE>
         This text will not be displayed
      </BODY>
   </HTML>

There are two workarounds to this problem.

Use <XMP> instead of <PRE>. Please note that <XMP> is considered obsolete by the W3C and may not be supported in future versions of IE:

   <HTML>
      <BODY>
         <XMP>
            Some preformatted text
            x < y
         </XMP>
         This text will be displayed
      </BODY>
   </HTML>

-or-

Use &lt instead of "<".

   <HTML>
      <BODY>
         <PRE>
            Some preformatted text
            x &lt y
         </PRE>
         This text will be displayed
      </BODY>
   </HTML>

REFERENCES

HTML Reference in the Internet Client SDK Help:

   http://www.microsoft.com/msdn/sdk/inetsdk/help

W3C HTML Specification: http://www.w3.org


Additional query words: PRE XMP
Keywords : kbfaq
Technology : internet kbInetDev
Version : WINDOWS:3.0,3.01,3.02
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbnofix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.