< All the HTML Tags >

<base></base>

Video Coming Soon...

  • base

    Tag Type

    metadata

    Tag Category

    metadata

    Defines a base URL for all relative links in the document.

    Viewed

    1

    Examples

    1

Definition:

The HTML <base> tag specifies the base URL for all relative URLs within a document.

It must be placed inside the <head> section of the HTML document and can include attributes such as href to define the base URL and target to specify how linked documents should open. This tag is useful in scenarios where all relative URLs need to refer to a specific base path, like when hosting a website in a subdirectory.

The `<base>` tag simplifies link management, making it easier to handle relative paths and improve page organization.

Attributes:

href, target

Accessibility:

Coming Soon…

Default base Example:

Base URL for links
<base href="https://example.com/">

Default base Result:


Coming Soon…

Community Examples:

Coming Soon…
Coming Soon…