The Most Active and Friendliest
Affiliate Marketing Community Online!

“Propeller”/  MyBid

I have no clue what this error means D:

grarobso

New Member
affiliate
Alright, so i'm trying to make a mobile website (since it's mobile, it has to be in XHTML), and when i ran it through an online XHTML validator (to see if it's coded properly), i got this funky error that i don't get (i'm a newb, remember):

document type does not allow element "img" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag

The code for the error was this:

<img src="images/logo4.jpg" alt="Sentex Data Communications"</img>

I bolded and enlarged the part that the validator underlined as having an error. Any guidance? Oh, and although I'd love the solution, an explanation would be nice too, so i don't make the mistake again. Thanks =)
 
I think it means that if you put an image tag on the page that it has to be within another tag pair such as p, div, or h1. If you don't put it within one of these its not valid XHTML, not to mention that where it appears on the page will be unpredictable.

eg:

Code:
<div>
<img src="image.jpg"></img>
</div>

Hope this helps

PS if you are going to write XHTML maybe you should read a book on it first to you know what you're doing
 
MI
Back