Mar
11
Need an VALID xhtml code for adding an image to my blog.?
Bywordpress design Question: 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?
Best Response:
Answer by HandyManOrNot
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.
Tags: xhtml code, tag code, image tag, design question, validation checkRelated Posts:
- How to change sidebar position in this WORDPRESS theme?
- in wordpress I want to place a home page that is different from the theme, I want just a page of my own design?
- Can I change the header image per category on a wordpress theme?
- How can I hard-code a custom entry into my WordPress RSS feed?
- How to add an image to wordpress theme?

http://www.w3schools.com/tags/tag_IMG.asp
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.
Try this:
You can change the “p” tags to div tags and style as needed to make a nice div container for image links.
Ron