YouTip LogoYouTip

Dom Obj Legend

# HTML DOM Legend Object * * * ## Legend Object The Legend object represents an HTML `` element. ### Accessing the Legend Object You can use `getElementById()` to access the `` element: ```javascript var x = document.getElementById("myLegend"); (#) ### Creating a Legend Object You can use the `document.createElement()` method to create a `` element: ```javascript var x = document.createElement("LEGEND"); (#) ## Legend Object Properties | Property | Description | | --- | --- | | (#) | Returns a reference to the form that contains the legend. | ## Standard Properties and Events The Legend object also supports standard (#) and (#). * * * ## Related Articles HTML Reference: [HTML `
` Tag](#) HTML Reference: [HTML `` Tag](#)
← Prop Legend FormProp Label Htmlfor β†’