Glossary
Base tag

Base tag

The base tag () sets the default base URL for every relative link on a page, so links elsewhere in the code don't need to repeat the full address. It has to live inside the of the document, and while it doesn't need a closing tag, it does need either an href or a target attribute to do anything.

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:

  • _self opens the link in the current window
  • _blank — opens the link in a new window
  • _parent opens the link in the parent window if using a frame. Otherwise, it uses the current window.
  • _top opens the link in the topmost browsing content. If there’s no parent browser, it uses the current window.

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 hands-on with HTML basics in Custom code in Webflow.

Other glossary terms

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Hmm…we couldn’t find any results. Try a different search term or reset the filter.
Reset the filter
Load more
Morty Proxy This is a proxified and sanitized view of the page, visit original site.