(Korrektur)
bearbeitet von Rolf BMist!
> ~~~HTML,bad
> <label for="zuname">Nachname:</label>
> <input type="text" name="nachname" id="nachname" maxlength="40">
> <br>
> <label for="zuname">Vorname:</label>
> <input type="text" name="vorname" id="vorname" maxlength="40">
> <br>
> <label for="sendbutton"></label>
> <button id="sendbutton">senden</button>
>
> ~~~
Besser:
~~~HTML
<label for="zuname">Nachname:</label>
<input type="text" name="nachname" id="nachname" maxlength="40">
<br>
<label for="vorname">Vorname:</label>
<input type="text" name="vorname" id="vorname" maxlength="40">
<br>
<label for="sendbutton"></label>
<button id="sendbutton">senden</button>
~~~
(Eines der „for“-Attribute hatte den falschen Wert.)
Oft bessere Idee: verwende <label> und css
bearbeitet von RaketenwilliMist!
> ~~~HTML,bad
> <label for="zuname">Nachname:</label>
> <input type="text" name="nachname" id="nachname" maxlength="40">
> <br>
> <label for="zuname">Vorname:</label>
> <input type="text" name="vorname" id="vorname" maxlength="40">
> <br>
> <label for="sendbutton"></label>
> <button id="sendbutton">senden</button>
>
> ~~~
Besser:
~~~HTML
<label for="zuname">Nachname:</label>
<input type="text" name="nachname" id="nachname" maxlength="40">
<br>
<label for="vorname">Vorname:</label>
<input type="text" name="vorname" id="vorname" maxlength="40">
<br>
<label for="sendbutton"></label>
<button id="sendbutton">senden</button>
~~~
(Eines der „for“-Attribute hatte den falschen Wert.)