Is the <PRE> tag still supported in XHTML 1.1 Strict?
Thanks
-Sam
| SitePoint Sponsor |





Is the <PRE> tag still supported in XHTML 1.1 Strict?
Thanks
-Sam
Sam Hastings
I think so... but I'd just use the following CSS code:
Code:whitespace: pre;![]()





Thanks!
-Sam
Sam Hastings
Welcome.![]()
it's actuallyCode:white-space: pre
Who walks the stairs without a care
It shoots so high in the sky.
Bounce up and down just like a clown.
Everyone knows its Slinky.





Thanks to you too!
-Sam
Sam Hastings
Ah... thanks for spotting that, Jeff.
Sorry, Sam, for not catching that.![]()





<PRE> isn't in any version of XHTMLOriginally Posted by Devilware.net
Try this:
http://www.w3.org/TR/xhtml11/doctype.html#s_doctype
Also just for fun, XHTML 1.1 Strict does not exist either, it is just XHTML 1.1, because there are no other versions!Text Module*
abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
Silly me,
Douglas
Hello World
Ah, well... some of us have to make mistakes.![]()





Got to make up for those who don'tOriginally Posted by compuwhiz7
Douglas
Hello World
My sentiments exactly.![]()


I think this doesn't work in IE ?
Any work arounds ?





I could look it up .. but what does the "<pre>" tag used for anyways..
"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com
It works in IE6, the only work around in previous versions is to use the <pre> tag.Originally Posted by Amit
(Chuckie: It makes code preserve white-space - enter, tab, space; useful for displaying plain text or code.)
Who walks the stairs without a care
It shoots so high in the sky.
Bounce up and down just like a clown.
Everyone knows its Slinky.


Jeff, I tried it, it doesn't work in IE6 with XHTML 1 Transitional.
I mean the tage <pre> works in HTML 4 and even in XHTML 1, (albeit it shouldn't in XHTML 1 Transitional) but
div.pre
{
white-space: pre;
}
doesn't work
Any help ?





Tested in IE 6:
DouglasCode:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> [...] p { white-space: pre; } [...] <p>This is some text</p>
PS: What do you mean about pre not working in XHTML 1 Transitional? It is valid in Strict!
Hello World
Note that when using white-space:pre, it doesn't set any font settings, you'd need to define a font if you don't want the default one used.
Who walks the stairs without a care
It shoots so high in the sky.
Bounce up and down just like a clown.
Everyone knows its Slinky.
Right.![]()





ThanksOriginally Posted by Jeff Lange
![]()
"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com


Ok, here is the funny thing:
works like charm in IE, but wait untill you add the xml prologCode:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <title>Just Tesing</title> <style> p { white-space: pre; } </style> </head> <body> <p>This is some text and then some then again ....</p> </body>
and it goes haywire ...Code:<?xml verison='1.0' encoding='utf-8' ?>
Suggestions ?
IE doesn't like the prolog and switches to horrible quirks mode....leave it out of your documents and you'll be fine
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com


A quicke: But removing the prolog make non compliant to W3C standards ?





It's optional
Hello World
XML Declaration: Not required with XHTML.
Who walks the stairs without a care
It shoots so high in the sky.
Bounce up and down just like a clown.
Everyone knows its Slinky.

Here is a place at W3C where you can go to check out the <pre> tag: http://www.w3schools.com/tags/tag_pre.asp
After the third time of reading the instructions,
it finally soaks in to my thick skull.
![]()
Bookmarks