Ash ashovi at qwest.net
Tue Jun 6 09:59:19 MDT 2006

Jonathan Duncan wrote:

> On Mon, 5 Jun 2006, Ash wrote:
>>>> When a document validates through validate.w3.org, it gives the  
>>>> code for
>>>> copy/paste, and it includes the <p>-wrapped <img> tags.  I believe  
>>>> it's
>>>> for CSS.  For text-only browsing, or if the image is not 
>>>> available,  the
>>>> alt text (I think) receives the attributes assigned to <p> tags 
>>>> via  CSS.
>> From what I've read, strict xhtml compliance requires all <img> tags to
>> be within a <p> tag. It has something to do with block and inline.
>> Ash
> They do not need to be in a P tag, but they should be in a block level 
> element, which a P tag is, but so is a DIV.  I usually wrap my pages 
> in at least one div so this usually is not an issue for me.  If you 
> want to talk strict, P tags should be used for paragraphs of text, 
> which can include images but you do not need to put images in P tags.
> CSS has a lot of little "quirks", which are really just "the right way 
> to do it".  HTML had become so bastardized and mutated for so long, 
> XHTML and CSS is just getting HTML back to the way it was supposed to 
> be.  HTML is just a markup language, hence the acronymn.  With XHMTL, 
> all HTML should only be used for markup.  Any visual enhancements 
> should be done via CSS.
> Jonathan

Right, I should have said "strict xhtml compliance requires all <img> 
tags to be within a <p> tag (or any other block element).


More information about the UPHPU mailing list