Pluto: Validierung von HTML Code

Hallo Forum,

warum soll das input Element hier nicht erlaubt sein. Bei der Validierung kommt ein Fehler:

...

<form method="post" action="index.php">
<input type="hidden" name="mode" value="add" />
<table border="1" cellpadding="2" cellspacing="1" width="300">

...

  1. Hi,

    <form method="post" action="index.php">
    <input type="hidden" name="mode" value="add" />

    Ich vermute mal das hier:

    <table border="1" cellpadding="2" cellspacing="1" width="300">

    Da du dich allerdings weigerst, deinen Doctype anzugeben und die Fehlermeldung für dich behälst, ist es ein Ratespiel.

  2. Hallo

    warum soll das input Element hier nicht erlaubt sein. Bei der Validierung kommt ein Fehler:

    ich vermute, Du verwendest eine Strict-Variante?

    Wie Dir SELFHTML sagt, darf das <form>-Element nur bei Transitional Inline-Elemente enthalten. Wie Du der Liste der Inline-Elemente entnehmen kannst, ist input ein Inline-Element. Also darf es bei Strict in <form> enthalten sein, sondern in ein Block-Element gepackt werden.

    <form method="post" action="index.php">
    <input type="hidden" name="mode" value="add" />
    <table border="1" cellpadding="2" cellspacing="1" width="300">

    Freundliche Grüße

    Vinzenz

    1. Danke!

      Jetzt weiß ich Bescheid! :)