Results 1 to 3 of 3

Thread: One of the validation errorss

  1. #1
    Join Date
    Apr 2007
    Posts
    149
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default One of the validation errorss

    Hello. I was trying to validate my website, and sadly , very sadly , i got LOTS of erros, and one of them is the following:

    Code:
    #  Error  Line 72, Column 301: end tag for "img" omitted, but OMITTAG NO was specified.
    
    …width="15" height="12" border="0"></a>	  </p>
    
    ✉
    
    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    but how am i supposed to close that tag? that was a link and it should be fine... or am i wrong? why can't i validate it because of that kind of errors?

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I suppose you're using a XHTML DTD.

    If you can help it, use HTML 4.01 Strict (or Transitional). XHTML isn't supported in all browsers. And I can say with most probability you're only using HTML. So, in fact, labelling it as XHTML is incorrect and invalid in itself (though it will still validate).

    In XHTML, though, all tags need to be closed, as below. Notice the trailing backslash at the end of the tag.

    <img src="path/to/image" alt="image" />

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    It looks like you are trying to validate as XHTML, in which case you would close your img tag like so:

    Code:
    <img ... />
    There are several discussions as to why you should try to avoid using XHTML around the forums.

    Hope this helps.

    Edit: sorry medyman, cross posted
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •