HTML <base> href Attribute Last Updated : 12 Mar, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report HTML <base> href Attribute specifies the base URL for all relative URLs in a document, serving as the reference point for resolving relative links and resources. Syntax: <base href="URL">Attribute Values: It contains the value i.e URL which specifies the absolute URL that defines the base URL of the page. for eg."www.geeksforgeeks.org" HTML <base> href Attribute ExamplesExample 1: This Example illustrates the use of the href attribute in an element. HTML <!DOCTYPE html> <html> <head> <!-- Declaring the BASE URL --> <base href= "https://media.geeksforgeeks.org/wp-content/uploads/" target="_blank"> </head> <h1>GeeksForGeeks</h1> <h2> HTML base href Attribute </h2> <body> <img src="1-95.jpg" width="400" height="250"> </body> </html> Output: Supported BrowsersThe browser supported by HTML <base> href Attribute are listed below: Google ChromeEdge FirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML <base> href Attribute M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Similar Reads HTML <a> href Attribute The HTML <a> href attribute is used to specify the URL of the page that the link points to. When the href attribute is not present in the <a> element, it will not function as a hyperlink. This attribute is essential for creating links to any address and is used in conjunction with the 1 min read HTML | <area> href Attribute The <area> href attribute is used to specify the URL of the target page. When the href attribute is not present in the <area> an element that it will not be a hyperlink. Syntax: <area href="URL"> Attribute Value: absolute URL: It points to another website.relative URL: It points to 1 min read HTML | <a> hreflang Attribute The HTML hreflang Attribute is used to specify the language for a linked document. It is used only when the href attribute is set. Syntax: <a hreflang="language_code"> Attribute Values: language_code: It specify the language code of the Linked Document. Example: html <!DOCTYPE html> < 1 min read HTML | <base> target Attribute The <base> target Attribute in HTML is used to specify the default target for all hyperlinks and forms in the webpage. This attribute could also be overridden by the use of the target attribute for each hyperlink and the Form. Syntax: <base target="_blank|_self|_parent|_top|framename" > 1 min read HTML <a> charset Attribute HTML <a> charset attribute specifies the character encoding for an external resource linked with the HTML anchor element. It ensures proper interpretation of text by defining the character set used in the linked resource.Note: It is not supported by HTML5.Syntax:<a charset="value">Attrib 1 min read Like