HTML: The Markup Language Reference

legendtitle or explanatory caption # T

The legend element represents a title or explanatory caption for the rest of the contents of the legend element’s parent element.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.

Tag omission #

A legend element must have both a start tag and an end tag.

Permitted parent elements #


DOM interface #

interface HTMLLegendElement : HTMLElement {
  readonly attribute HTMLFormElement form;

Typical default display properties #

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