
Base HTML: HTML tags are the components of markup language HTML used at the start and end of an HTML element for different attributes and functions in an HTML document. HTML is a strong markup language used for creating the structure of the web page. The tags in the HyperText Markup Language are used to make the browser read or identify HTML documents.
The base tags in the HTML document are used to specify the base URL or URI for all relative links within an HTML document. Let us know more about the <base> tag in this article.
| <base href=”https://pwskills.com”> |
| HTML Base tags |
| <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <base href=" https:// pwskills.com/base-path"> <title>Document</title> </head> <body> <!-- Other HTML content with relative URLs → <a href="page.html">Link to Page</a> <img src="images/image.jpg" alt="Image"> </body> </html> |
| HTML Base Tags Attributes | ||
| Name of attribute | Value | Definition |
| href | URL link | Used to specify the URL for all relative links in an html document. |
| Target value | _blank | It opens the relative link in a new window. |
| _self | It is used to open the link on a current window. | |
| _parent | It opens the link in the parent tab. | |
| _top | It is used to open the links in full size. | |
| HTML Base tags |
| <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <base href=" https:// pwskills.com/base-path" target = “_blank”> <title>Document</title> </head> <body> <!-- Other HTML content with relative URLs → <a href="page.html">Link to Page</a> <img src="images/image.jpg" alt="Image"> </body> </html> |