Grab source?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post 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
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

no worries. Glad it helped :)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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.
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post 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
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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. :?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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);
?
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

ok so was that supposed to be replaced with <code> and theres another that i cannot think of
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

xmp is depreciated, pre tags should work similarly, although without the hideous default formatting that xmp brings (monospaced font? ICK!).
Post Reply