You are here: Re: img tag in XHTML strict « HTML « IT news, forums, messages
Re: img tag in XHTML strict

Posted by Andy Dingley on 01/14/06 00:45

On 13 Jan 2006 21:05:12 GMT, tochiromifune <nospam@nospam.com> wrote:

>My page fails the W3C validation test because my <img> tags are not
>included in block level tags. Does that mean I must write:
><p><img src="" alt="" /></p>
>instead of
><img src="" alt="" />

Probably <div>img src="" alt="" /></div> is better, but you're basically
right.

If it was reasonable to put <img> into a <p>, you'd probably already
have done it. If you want something that's more "anonymous" (for a
free-floating image not connected with any text), then use a <div>.
You might also wish to put a class on all these img-container <div>s,
just so you can easily control their CSS properties.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация