• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Using Head Elements > Inserting a Base Href

Inserting a Base Href

A Base Href tag indicates the location of the central page in the site that relative links are based on. Generally this is the index.html page (or other default page) that is the central content page for the entire site. When you insert this tag on different pages throughout a site, each one will indicate its document-relative location to the base page.

To insert a base href:

1.
From the Document window menu bar, select Insert > Head Tags > Base, or click the Base button on the Head tab of the Insert toolbar. The Base dialog box will appear (Figure 15.16).

Figure 15.16. When you insert a base tag, you can set a base href, a base target, or both.


2.
In the Href text box, type the location of the base target page; or, click on Browse to open the Select File dialog box and choose a file from your local site. In the latter case, Dreamweaver will code the correct document-relative link path for you.

3.
The target attribute sets a base location in which all the links on the page should open. This can be a frame, a new window, or a JavaScript window. To make all links open in a new window, select _blank. To make all links open in the current window, select _top.

4.
When you’re finished, click on OK. Dreamweaver will add the Base icon to the Head Elements toolbar, and the code will look like this:

<base href="../appendix/index.html" target="_blank">


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint