X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM Legend Object


Legend Object

The Legend object represents an HTML <legend> element.

Access a Legend Object

You can access a <legend> element by using getElementById():

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

Create a Legend Object

You can create a <legend> element by using the document.createElement() method:

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

Legend Object Properties

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

Standard Properties and Events

The Legend object also supports the standard properties and events.


Related Pages

HTML reference: HTML <fieldset> tag

HTML reference: HTML <legend> tag



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook