“mobile”/ banners
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

I have no clue what this error means D:

Discussion in 'Programming and Scripts' started by grarobso, Jul 31, 2009.

  1. grarobso

    grarobso Affiliate 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 =)
  2. newbidder
  3. Robster78

    Robster78 Affiliate affiliate

    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.


    <img src="image.jpg"></img>
    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

Top Resources