Need an VALID xhtml code for adding an image to my blog.?

My wordpress design is valid and all, but the moment I add an image to my site, it shows a bunch of errors when running it in the validation check.

Can anyone provide me with a code I can use to place images in a wordpess page, which is valid?

A valid IMG tag in XHTML must meet 3 criteria…

All parameters must be enclosed by opening and closing double quotes
There must be an ALT tag for alternate text
The tag must be properly closed.

<img src="Car.jpg" alt="A blue car" />

4 Responses to “Need an VALID xhtml code for adding an image to my blog.?”

  • HandyManOrNot says:

    XHTML basically means that every tag must have an ending tag.

    For the image tag, just make sure to end it.

    Please post the image tag code you are using that fails validation so we can see what is wrong.
    References :

  • PhonicUK says:

    A valid IMG tag in XHTML must meet 3 criteria…

    All parameters must be enclosed by opening and closing double quotes
    There must be an ALT tag for alternate text
    The tag must be properly closed.

    <img src="Car.jpg" alt="A blue car" />
    References :

  • Ron says:

    Try this:

    <p><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description" /></p>

    You can change the "p" tags to div tags and style as needed to make a nice div container for image links.

    Ron
    References :

Leave a Reply

Icy Clean Theme
Think White Theme
Clean Green Theme
Design Your Own!
Artisteer - Wordpress Theme Generator