WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Anchor Object


Anchor Object

The Anchor object speaks to a HTML <a> element.

Access an Anchor Object

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

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

Create an Anchor Object

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

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

Anchor Object Properties

= Property included HTML5.

Property Description
charset Not bolstered in HTML5.
Sets or returns the estimation of the charset quality of a link
download Sets or returns the estimation of the download trait of a link
hash Sets or returns the grapple some portion of the href property value
host Sets or returns the hostname and port piece of the href property value
hostname Sets or returns the hostname part of the href characteristic value
href Sets or returns the estimation of the href characteristic of a link
hreflang Sets or returns the estimation of the hreflang property of a link
origin Returns the convention, hostname and port piece of the href characteristic value
name Not upheld in HTML5. Use element.id instead.
Sets or returns the estimation of the name property of a link
password Sets or returns the secret word some portion of the href characteristic value
pathname Sets or returns the pathname part of the href property value
port Sets or returns the port piece of the href characteristic value
protocol Sets or returns the convention part of the href trait value
rel Sets or returns the estimation of the rel trait of a link
rev Not upheld in HTML5.
Sets or returns the estimation of the rev trait of a link
search Sets or returns the querystring part of the href quality value
target Sets or returns the estimation of the objective property of a link
text Sets or returns the content substance of a link
type Sets or returns the estimation of the sort trait of a link
Sets or returns the username part of the href trait value