[WEB4LIB:14781] HTML CODE QUESTION
Thomas Dowling
tdowling at ohiolink.edu
Wed Aug 12 12:35:24 EDT 1998
The HTML 4.0 specification, Appendix A: "The following elements are
obsolete: LISTING, PLAINTEXT, and XMP. For all of them, authors should
use the PRE element instead." Of course, it's something of a news event
if Netscape supports something from HTML 4.0; HTML 3.2 shows XMP as
deprecated in the DTD but calls it obsolete in the description at
http://www.w3.org/TR/REC-html32.html.
That aside, I don't see this problem with NC4.5b1, but it is a first beta
and is more likely to act flaky than official releases.
And *that* aside, I would tag this as either:
<pre>
<html>
<script type="text/javascript>...
</pre>
Or:
<p><code><html><br>
<script type="text/javascript>...
</code></p>
The cumbersome part of this, of course, is handling the < and >
characters, but a good search and replace will handle that. At this
point, there isn't any way to mark up HTML to reliably ignore < and >.
Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu
> -----Original Message-----
> From: web4lib at webjunction.org
> [mailto:web4lib at webjunction.org]On Behalf Of Andrew J. Mutch
> Sent: Wednesday, August 12, 1998 12:14 PM
> To: Multiple recipients of list
> Subject: [WEB4LIB:14781] HTML CODE QUESTION
>
>
> Hi,
>
> I thought I had the answer to this question but strange behavior by my
> browser (Netscape 4.5 Preview V.1) forces me to confirm it.
>
> When you want HTML code to appear on a page as text, what tags
> should you
> surround it with so that this will happen??
>
> I currently use the <XMP> tags and I use this on my Netscape Kiosk help
> page. However, when I was looking at the page in my browser, instead of
> printing the code exactly as how it is entered, it chopped certain
> characters. I'm not sure what is causing this and whether this
> is a "bug"
> in NN 4.5. It looks fine in NN 4.05.
>
> For example, a line that should say:
>
> window.open("http://....
>
> looks like this:
>
> /*ndow.open("http://....
>
> See: http://tln.lib.mi.us/~nort/tech/kiosk.htm
>
> Any ideas??
>
> Andrew Mutch
> Northville District Library
> Northville, MI
>
>
More information about the Web4lib
mailing list