#1
  1. Big Daddy
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Sep 2003
    Location
    Boston
    Posts
    1,473
    Rep Power
    36

    "but OMITTAG NO was specified" - HUH?!


    Hi all, one of the pages on my site is giving me trouble with W3C validation. The only error I am getting from W3C is this:

    Code:
    Line 47, column 51: end tag for "img" omitted, but OMITTAG NO was specified 
      <img src = "black_white.jpg" alt = "Cute Kid, eh?">
                                                         ^
    Line 47, column 0: start tag was here (explain...). 
      <img src = "black_white.jpg" alt = "Cute Kid, eh?">
      ^
    Here's the code for the page, very simple:

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    
    <title>Jonathan Bartlett</title>
    
    <link rel="stylesheet" type="text/css" href="jonathan.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
    </head>
    
    <body>
    
    
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
    <td colspan="3" class = "header"><h1>Jonathan Walker Bartlett</h1>
    </td>
    </tr>
    
    
    <tr>
    <td rowspan="2" width="10%" valign="top" class = "left">
    <p><a href = "pictures">Pics</a></p>
    <p><a href = "videos">Videos</a></p>
    <p><a href = "favorites">My Favs</a></p>
    <p><a href = "mystory">About Me</a></p>
    </td>
    
    <td align="center"></td>
    
    <td rowspan="2" width="10%" valign="top" class = "right">
    <p align = "right"><a href = "../chris">Daddy</a></p>
    <p align = "right"><a href = "../sokhan">Mommy</a></p>
    <p align = "right"><a href = "../john">Gimpy</a></p>
    <p align = "right"><a href = "../nancy">Ma</a></p>
    </td>
    </tr>
    
    <tr> 
    <td align="center">
    <h2>Welcome to my little corner of the world!</h2>
    <p>My Mommy and Daddy said I could have this website all to myself, so here I am!  I have only had a short life so far, but it has been filled with 
    
    adventure.  Mommy and Daddy have taken lots of pictures and videos of me, and the links on both sides of my page will take you anywhere you wish to go! I 
    
    hope you enjoy my website!  If you like, you can e-mail me <a href = "mailto:jonathan@bartlett-family.net">here</a>!  I may only be 3, but I'm hip to 
    
    technology!</p>
    
    <img src = "black_white.jpg" alt = "Cute Kid, eh?">
    
    </td>
    </tr>
    </table>
    
    </body>
    
    </html>
    Line 47 is the line with the image tag. What is the W3C whining about? Did I miss something simple? Am I just not seeing the obvious? What's wrong? Thanks!

    Chris
    Pop, pop, fizz, fizz, oh what a relief it is!
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    XHTML requires a closing tag for all elements, including those that don't normally have one. In this case, you use /> instead of just > (just like you did in your <meta> tags.
    Code:
    <img src="foo.png" alt="" />
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. Big Daddy
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Sep 2003
    Location
    Boston
    Posts
    1,473
    Rep Power
    36
    THANKS! I knew it had to be something mind-numbingly simple that my brain just wasn't seeing! I hate it when you stare at code for so long that you just don't see things... I appreciate the help.

    Chris
    Pop, pop, fizz, fizz, oh what a relief it is!

IMN logo majestic logo threadwatch logo seochat tools logo