Page 2 of 2

Posted: Tue Feb 03, 2004 11:42 am
by malcolmboston
This is an obsolete HTML element. The syntax
<xmp>
text
</xmp>

is used to enclose to text to be presented literally using a constant width (monopitch) type face such as Courier. It also causes a paragraph break.
taken from here

Posted: Tue Feb 03, 2004 11:42 am
by patrikG
no worries. Glad it helped :)

Posted: Tue Feb 03, 2004 11:45 am
by patrikG
Yeah, it must have been obsolete for about 3 years now according to W3. Just like <b> is nowadays superseded by <strong>.
Find me a mainstream browser that doesn't support it.

Posted: Tue Feb 03, 2004 11:48 am
by malcolmboston
well said mate

W3C need to sort there act out imho, our jobs would be much easier if there was a standard to comply to

Posted: Tue Feb 03, 2004 11:53 am
by patrikG
malcolmboston wrote:
This is an obsolete HTML element. The syntax
<xmp>
text
</xmp>

is used to enclose to text to be presented literally using a constant width (monopitch) type face such as Courier. It also causes a paragraph break.
taken from here
Its main functionality is actually that excludes anything within the tag from being parsed - xmp is short for example, it was meant to be used for example code.

Great. Now I feel like a geek for knowing that. :?

Posted: Tue Feb 03, 2004 11:54 am
by Weirdan
patrikG wrote:use <xmp> ... </xmp>.
I believe it's deprecated tag. Wouldn't this be more portable:

Code: Select all

echo htmlspecialchars($htmlSource);
?

Posted: Tue Feb 03, 2004 11:55 am
by malcolmboston
ok so was that supposed to be replaced with <code> and theres another that i cannot think of

Posted: Wed Feb 04, 2004 11:35 am
by Roja
xmp is depreciated, pre tags should work similarly, although without the hideous default formatting that xmp brings (monospaced font? ICK!).