[HTML] [tag] <legend>

<legend> (tag HTML) crea un’intestazione didascalica al relativo tag HTML <fieldset> (suo padre necessario) annidato in un tag HTML <form> (suo ascendente necessario).

attributi

speciali

Nessuno.

globali
Caricamento…

scheda tecnica

– Categoria: nessuna
– Tipo: blocco
– Intefraccia DOM: HTMLLegendElement
– Supporto browser: totale

Sintassi

<fieldset>
 <legend>[oggetto]</legend>
</fieldset>

Default CSS

legend {
  display: block;
  padding-left: 2px;
  padding-right: 2px;
  border: none;
}

Esempio

<form>
  Elemento 1:<br>
  <input type="text"><br>
  <fieldset>
    <legend>Intestazione gruppo</legend>
    Elemento 2:<br>
    <input type="text"><br>
    Elemento 3:<br>
    <input type="text"><br>
  </fieldset>
  Elemento 4:<br>
  <input type="text">
</form>

Elemento 1:

Intestazione gruppo

Elemento 2:

Elemento 3:

Elemento 4:

Contenuti correlati

  • CSS
  • HTML
  • JavaScript
  • jQuery
  • PHP
  • SQL
  • WORDPRESS

Fonti esterne

html, tag html

Related Articles

0 Comment

Rispondi