Hallo mensen,

Ik heb dit:

<div id="toprechts">
<form method="post" action="">
<input class="showon" name="topshowsession" type="submit" value="Info"/>
<input class="clear" name="topclear" type="submit" value="eXit"/>
<input class="showoff" name="topchoosegame" type="button" value="Spel"/>
<input class="showtaaloff" value="NL" name="toplanguage" type="button"/>
<input class="showon" name="topingelogd" type="submit" value="Login"/>
<input type="hidden" name="tophidden"/>
</form>
</div>


En ik krijg op alle input tags een validate error:

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

…me="topchoosegame" type="button" value="Spel"/>

&#9993;

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


Wat doe ik hier niet goed?

SanThe.
Je valideert het als xhtml strict zeker.

Het form element mag geen inline elementen (zoals input) direct als child hebben. Als je alle input elementen in een div zet, is het wel goed.

Als je het als xhtml transitional valideert, krijg je deze error niet.
Dankjewel Leen.
Bij beide formulieren een div geplaatst en alles is weer valid.

Thanks.

SanThe.

Reageren