Element legend reprezentuje podpis elementu fieldset.
Kontekst użycia
| Modele treści HTML5 | brak |
|---|---|
| Elementy nadrzędne | fieldset |
| Elementy potomne | |
| Znaczniki | Znaczniki otwierający i zamykający są obowiązkowe |
| Normy | HTML 5 — podrozdział 4.10.5; HTML 4.01 — podrozdział 17.10 |
| Interfejs DOM | HTMLLegendElement |
| Różnice między HTML 4.01 a HTML 5 | W HTML 5 usunięto atrybut align z elementu W HTML 5 element |
Przykłady użycia
Formularz zawierający grupę kontrolek
o nazwie
logowaniei element legend
<form action="skrypt.php" method="get">
<fieldset>
<legend>Dane do logowania:</legend>
Login: <input type="text" name="login" /><br />
Hasło: <input type="text" name="haslo" /><br />
</fieldset>
</form>
Obsługa przez przeglądarki
| Firefox | Chrome | Opera | Safari | Internet Explorer |
|---|---|---|---|---|
| ✔ | ✔ | ✔ | ✔ | ✔ |
Atrybuty obowiązkowe
Element legend nie ma atrybutów obowiązkowych.
Atrybuty opcjonalne
Atrybuty globalne HTML 5.











Wysyłam...