Base Object
The href property sets or returns the value of the href attribute in a base element.
The href attribute specifies a base URL for all relative URLs on a page.
![]()
The href property is supported in all major browsers.
Return the base URL for all relative URLs on a page:
The output of the code above will be:
Base Object
Your message has been sent to W3Schools.