Il tag HTML <legend>


Descrizione

Il tag HTML <legend> viene usato per aggiungere un etichetta al tag <fieldset>.

Esempio

<!DOCTYPE html>
<html>
<head>
<title>HTML legend Tag</title>
</head>
<body>
<form>
 <fieldset>
  <legend>Details</legend>
  Student Name: <input type="text"><br />
  MCA Subjects:<input type="text"><br />
  Course Link:<input type="url" name="websitelink">
 </fieldset>
</form>
</body>
</html>

Produrrà il seguente risultato:

Details Student Name:
MCA Subjects:
Course Link:

Attributi Globali

Questo tag supporta tutti gli attributi globali descritti in - HTML - Referenze Attributi

Attributi Specifici

Il tag HTML <legend> supporta anche i seguenti attributi aggiuntivi:

AttributoValoreDescrizione
align top
bottom
left
right
Deprecato- Specifica l'allineamento del contenuto.

Attributi Evento

Questo tag supporta tutti gli attributi evento descritti in - HTML - Referenze Eventi

Compatibilità Browser

ChromeFirefoxIEOperaSafariAndroid
SiSiSiSiSiSi
html_tags_reference.htm
Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements