Spread the love

HTML <base> Tag is employed to specify a base URI or URL to use for all relative links contained within an HTML Document.

Only one <base> element is often specified within a document, and it must be placed within the <head> element. we will also specify how other links should open (in an equivalent window, in another window, etc.) using the target attribute.

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML Base tag</title>
  <base href="https://www.myprograming.com/" target="_blank">
</head>
<body>
 
<h1>Myprograming TUTORIALS LIST</h1>
<br>
<a href="/category/html/">HTML TUTORIALS</a><br><br>
<a href="/category/css/">CSS TUTORIALS</a><br><br>
<a href="/category/c/">C TUTORIALS</a><br><br>
<a href="/category/bootstrap/">BOOTSTRAP TUTORIALS</a><br><br>
<a href="/category/wordpress/">WORDPRESS TUTORIALS</a><br><br>
<a href="/category/javascript/">JAVASCRIPT TUTORIALS</a><br><br>
<a href="/category/jquery/">JQUERY TUTORIALS</a>

</body>


</body>
</html>

Output:-

HTML Base tag

Myprograming TUTORIALS LIST


HTML TUTORIALS

CSS TUTORIALS

C TUTORIALS

BOOTSTRAP TUTORIALS

WORDPRESS TUTORIALS

JAVASCRIPT TUTORIALS

JQUERY TUTORIALS

Note:- specifies the default URL and the default target for all links on the page.


Spread the love

Related Posts

One thought on “HTML Base Tag

Leave a Reply

Your email address will not be published. Required fields are marked *