Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

href attribute | href property

Gets or sets the baseline URL on which relative links are based.

HTML 4.01 Specification, Section 12.4

 

Syntax

HTML<element href="p" ... >
JavaScript

p = object.href

 

Property values

Type: String

the URL.

Standards information

Remarks

Windows Internet Explorer 8 or later. In IE8 Standards mode, the value of the href attribute depends on the context of the reference to the attribute. When read as a Document Object Model (DOM) attribute, href returns an absolute URL. The value specified by the page author is returned when href is read as a content attribute, when the page is displayed in an earlier document compatibility mode, or when the page is viewed with an earlier version of the browser. For more information, see Attribute Differences in Internet Explorer 8.

See also

base

 

 

Show:
© 2017 Microsoft