<base> Element

  • Used to define a base URL for relative links within the document
  • Can only be one base element
  • Must be contained within the <head> element
  • Does not have a closing tag, therefore requires a closing forward slash


Example showing the relative path being used with the src attribute:

Save & refresh browser:

Leave a Reply