Name

base — <base />

Specifies the base pathname for all relative URLs in the document. Place this element within the head of the document.

Attributes

href ="url"

Required. Specifies the URL to be used.

id="text"

XHTML only. Assigns a unique identifying name to the element.

target ="name"

Defines the default target window for all links in the document. Often used to target frames.

Example

<head>
    <title>Sample document</title>
    <base href="/stories/" />
</head>

Get HTML and XHTML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.