Filter (Advanced Search)
Downloads
0
Views
215
Video

Video is not available... Embedded is previous playlist.

Details

The <base> element specifies the base URL and/or target for all relative URLs in a page.

The <base> tag must have either an href or a target attribute present, or both.

There can only be one single <base> element in a document!


<!DOCTYPE html>
<html>
<head>
  <base href="https://www.gssskhokhar.com/" target="_blank">
</head>
<body>

<h1>The base element</h1>

<p><img src="/images/kitten.gif" width="24" height="39" alt="cat"> - Notice that we have only specified a relative address for the image. Since we have specified a base URL in the head section, the browser will look for the image at "https://www.gssskhokhar.com/images/kitten.gif".</p>

<p><a href="#">HTML base tag</a> - Notice that the link opens in a new window, even if it has no target="_blank" attribute. This is because the target attribute of the base element is set to "_blank".</p>

</body>
</html>



Ad