Share via


IHTMLBaseElement Object

IHTMLBaseElement

Represents the BASE element of an HTML document. Use the IHTMLBaseElement object to specify the base URL for all relative URLs in a Web page. The IHTMLBaseElement object has limited access to properties related to the BASE element. For access to all properties and methods, use the FPHTMLBaseElement object.

Using the IHTMLBaseElement object

Use the tags method to return an IHTMLElementCollection collection that represent all BASE elements in a document.

Use the **Item**method to return an ITHMLBaseElement object that accesses a specific BASE element, referenced by ordinal number or by the value of the id attribute. The following example accesses the first BASE element in the active document.

Dim objBase As IHTMLBaseElement

Set objBase = ActiveDocument.all.tags("base").Item(0)

Properties | href Property | target Property

Parent Objects

Child Objects