tags:

views:

41

answers:

1

Hi,

Can someone help me and explain me why this isn't validated?

My doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;

The errors:

 1. line 55 column 14 - error: document
    type does not allow element "div"
    here; missing one of "object",
    "applet", "map", "iframe", "button",
    "ins", "del" start-tag

    <div id="tabs">

 2. line 62 column 24 - Fout: document
    type does not allow element "div"
    here; missing one of "object",
    "applet", "map", "iframe", "button",
    "ins", "del" start-tag

    <div style="clear:both;"></div>

  3. line 65 column 22 - Fout: document
     type does not allow element "div"
     here; missing one of "object",
     "applet", "map", "iframe", "button",
     "ins", "del" start-tag



  4. <div id="calculator">

     line 76 column 19 - Fout: document
     type does not allow element "div"
     here; missing one of "object",
     "applet", "map", "iframe", "button",
     "ins", "del" start-tag

     <div id="feature">

  5. line 83 column 7 - Fout: end tag for
     "a" omitted, but OMITTAG NO was
     specified 

     </div>

This is the html, which can be viewed here also.

http://www.coldcharlie.nl/test/

+1  A: 

You shouldn't put a block level element such as <div> inside an inline element such as <span> or <a>

On line 55 you have an <a> element (hyperlink) that isn't closed. Then you have few <div>s. The validator thinks these divs are inside the <a>.

Alexandre Jasmin
Great, I needed to close the <a href, after closing it, every other error was gone too. Thanks!
Chris