HTMLAnchorElement:The a Element
The a element is represented by the HTMLAnchorElement object.
Name | Description | Returns |
---|---|---|
href | the href attribute | string |
target | the target attribute | string |
rel | the rel attribute | string |
media | the media attribute | string |
hreflang | the hreflang attribute | string |
type | the type attribute | string |
text | Gets or sets the text contained by the element | string |
protocol | get or set the protocol component of the href attribute value | string |
host | get or set the host component of the href attribute value | string |
hostname | get or set the host name from the href attribute value | string |
port | get or set the port component of the href attribute value | string |
pathname | get or set the path of the href attribute value | string |
search | get or set the query string of the href attribute value | string |
hash | get or set the document fragment component of the href attribute value | string |