Forum Moderators: open

Message Too Old, No Replies

Document type does not allow

Validator spit this one back out

         

Adam5000

4:13 pm on Mar 5, 2009 (gmt 0)

10+ Year Member



The validator spit this one back out.

Line 58, Column 58: document type does not allow element "IMG" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "ADDRESS" start-tag.

<img class="float" src="image_one.jpg" alt="Image_one">

Any clues on why?

Help!

lavazza

6:00 pm on Mar 5, 2009 (gmt 0)

10+ Year Member



The IMG tag is - by default - an INLINE-LEVEL (not a block-level) tag by itself, so it must be used only within a block element

Wrapping an IMG in a DIV can be a quick'n'easy workaround - at least in the short term

[w3.org...]

9.2.2 Inline-level elements and inline boxes

Inline-level elements are those elements of the source document that do not form new blocks of content; the content is distributed in lines (e.g., emphasized pieces of text within a paragraph, inline images, etc.). <snip/>

Adam5000

9:21 pm on Mar 5, 2009 (gmt 0)

10+ Year Member



Thanks lavazza. It looks like anchors are the same way.