Name

legend

Type

legend

Synopsis

Title for a _fieldset

Description

_legend is always used in combination with _fieldset. It is the title of a fieldset.

Parameters

_legend

The title comes between the beginning and end tags (see example).

Example

<_form action="get">
<_fieldset>
    <_legend>Choose your favorite monster</_legend>

  <_input type="radio" id="kraken" name="monster" />
    <_label for="kraken">Kraken</_label><br/>

  <_input type="radio" id="sasquatch" name="monster" />
    <_label for="sasquatch">Sasquatch</_label><br/>

  <_input type="radio" id="mothman" name="monster" />
    <_label for="mothman">Mothman</_label>
</_fieldset>
</_form>

<html><style>

   legend {
   background-color: #000;
   color: #fff;
   padding: 3px 6px;

}

.output {

   font: 1rem 'Fira Sans', sans-serif;

}

input {

   margin: .4rem;

}

 </style></html>

FORM CANNOT BE RENDERED, NOT VALIDATED

Note

Links

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset

ws-page-props