Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Legend object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Legend object


The Legend object

The Legend object represents an HTML-lt;legend-and-gt; element.

Access the Legend object

You can use getElementById() to access the elements:

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

Create a Legend object

You can use the document.createElement() method to create an element:

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

Legend object properties

Attributes describe
form Returns a reference to a form that contains LeGend.

Standard properties and events

Legend objects also support standard properties and events.


Related articles

HTML Reference Manual: HTML .lt;fieldset.gt; Tags

HTML Reference Manual: HTML slt;legend.gt; Tags