The base tag, represented by <base>, specifies the base URL for all relative links within the HTML code of a specific page or document.
The base tag must be within the <head> of the code. It doesn’t need a closing tag but does need an href or target attribute. If there’s a target attribute, it will be the default attribute for all hyperlinks within the HTML.
Here’s a syntax example: <base href="https://www.webflow.com">
The base element allows for a default target attribute for all links within the HTML page code.
Target attribute values include:
Here’s another syntax example with target attributes:
<base href="https://www.webflow.com" target="_blank">
This target attribute would open the link in a new, blank browser window or tab (depending on browser settings).
Get the best, coolest, and latest in design and no-code delivered to your inbox each week.