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.
[Back to original message]
|