HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Base object represents an HTML <base> element
The Base object represents an HTML <base> element.
Access a Base Object
You can access a <base> element by using getElementById():
var x = document.getElementById("myBase");
Create a Base Object
You can create a <base> element by using the document.createElement() method:
var x = document.createElement("BASE");
Property | Description |
---|---|
href | Sets or returns the value of the href attribute in a base element |
target | Sets or returns the value of the target attribute in a base element |
The Base object also supports the standard properties and events.
HTML reference: HTML <base> tag