The The |
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<base href="https://www.w3schools.com/" target="_blank">
</head>
<body>
<h1>The base element</h1>
<p><img src="images/stickman.gif" width="24" height="39" alt="Stickman"> - 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.w3schools.com/images/stickman.gif".</p>
<p><a href="tags/tag_base.asp">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>
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<title>This is an example for the <base> element</title>
<base href="http://www.example.com/news/index.html">
</head>
<body>
<p>Visit the <a href="archives.html">archives</a>.</p>
</body>
</html>
What is HTML - The Head Element | HTML - The Head Element |
How to create The HTML <head> Element | HTML - The Head Element |
How to create The HTML <title> Element in <Head> | HTML - The Head Element |
How to create The HTML <style> Element in <head> | HTML - The Head Element |
How to create The HTML <link> Element in <head> | HTML - The Head Element |
How to create The HTML <meta> Element in Head | HTML - The Head Element |
What is The HTML Viewport in Head | HTML - The Head Element |
How to use HTML Viewport in Head | HTML - The Head Element |
How to create The HTML <script> Element in head | HTML - The Head Element |
How to create The HTML <base> Element in head | HTML - The Head Element |
Example | HTML - The Head Element |
Example | HTML - The Head Element |
Read Full: | HTML - The Head Element |
Category: | Web Tutorial |
Sub Category: | HTML - The Head Element |
Uploaded: | 1 year ago |
Uploaded by: | Admin |
Views: | 18 |
Ref on: | View |