AvailabilityDOM Level 1 HTML Inherits from/OverridesNode Element HTMLElement HTMLAnchorElement PropertiesThis interface defines the properties in the following table, which correspond to the HTML attributes of the <a> tag.
Methods
DescriptionThis interface represents an <a> tag in an HTML document. href, name, and target are the key properties, representing the most commonly used attributes of the tag. HTMLAnchorElement objects can be obtained from the links and anchors HTMLCollection properties of the HTMLDocument interface. Example// Get the destination URL of first the hyperlink in the document var url = document.links[0].href; // Scroll the document so the anchor named "_bottom_" is visible document.anchors['_bottom_'].focus( ); See AlsoLink and Anchor objects in the client-side reference section |