HTML DOM Legend Object

Legend Object

The Legend object speaks to a HTML <legend> element.

Access a Legend Object

You can get to a <legend> component by utilizing getElementById():

var x = document.getElementById("myLegend");

Create a Legend Object

You can make a <legend> component by utilizing the document.createElement() method:

var x = document.createElement("LEGEND");

Legend Object Properties

Property Description
form Returns a reference to the structure that contains the legend

Standard Properties and Events

The Legend object additionally underpins the standard properties and .