Click here to get back home

img inside pre

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
img inside pre "Jarno Suni" not 09-17-2005
Get Chitika Premium
Posted by "Jarno Suni" not on September 17, 2005, 10:04 pm
Please log in for more thread options



It seems to be invalid in HTML 4.01, but valid in XHTML 1.0. Why is there the
difference? Can that pose a problem when such a XHTML document is served as
text/html?

Posted by David Dorward on September 17, 2005, 11:27 pm
Please log in for more thread options


"Jarno Suni" not@here.invalid wrote:

> It seems to be invalid in HTML 4.01, but valid in XHTML 1.0.

I created two test documents and compared. It (assuming you mean <pre>
elements containing <img> elements[1]) is invalid in both HTML 4.01 Strict
and XHTML 1.0 Strict.

[1] Please contain your whole message in the body text

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

Posted by "Jarno Suni" not on September 18, 2005, 10:29 am
Please log in for more thread options



> I created two test documents and compared. It (assuming you mean <pre>
> elements containing <img> elements[1]) is invalid in both HTML 4.01 Strict
> and XHTML 1.0 Strict.

I believe you. But
<pre><a><img src="image.png" alt="" /></a></pre>
validates as XHTML 1.0 Strict whereas
<pre><a><img src="image.png" alt=""></a></pre>
does not validate as HTML 4.01 Strict, when I used http://validator.w3.org/ for
validation.

> [1] Please contain your whole message in the body text

Ok, if it helps. Sorry for not being precise in my original message.

Posted by David Dorward on September 18, 2005, 1:29 pm
Please log in for more thread options


"Jarno Suni" not@here.invalid wrote:

> I believe you. But
> <pre><a><img src="image.png" alt="" /></a></pre>
> validates as XHTML 1.0 Strict

Valid, but non-conformant:
http://www.w3.org/TR/xhtml1/#h-4.9
http://www.w3.org/TR/xhtml1/#prohibitions



--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

Posted by "Jarno Suni" not on September 18, 2005, 1:17 pm
Please log in for more thread options



> "Jarno Suni" not@here.invalid wrote:
>
> > I believe you. But
> > <pre><a><img src="image.png" alt="" /></a></pre>
> > validates as XHTML 1.0 Strict
>
> Valid, but non-conformant:
> http://www.w3.org/TR/xhtml1/#h-4.9
> http://www.w3.org/TR/xhtml1/#prohibitions

Thanks, this clarifies the dilemma and gives me the reason to use different code.

Similar ThreadsPosted
What can be inside an tag? January 8, 2006, 7:56 pm
Do I need a

inside a

January 31, 2008, 1:08 pm
linebreak ignored inside
July 31, 2006, 9:54 am
is it acceptable to put a UL inside of a paragraph?? October 1, 2004, 11:01 am
help with image alignment inside a
March 19, 2005, 9:11 pm
centering a div inside of a div in FireFox May 24, 2005, 2:02 pm
div align bottom inside a td February 5, 2006, 7:27 pm
table inside form? March 31, 2006, 10:50 pm
table inside div block - no joy April 2, 2006, 6:26 pm
Link inside the ZIP file ? December 24, 2006, 4:07 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap