Graphics Programs Reference
In-Depth Information
must specify “_blank” as the target attribute. The complete anchor tag for opening a page
in a new browser window takes the following format:
<a href=”absolute or relative path” target=”_blank”> Link Text </a>
Another anchor tag attribute is the name attribute. The name attribute associates a
name with a specifi c, named location within a Web page. With the name attribute, you
can link to the named location on the current page or another page, much like a book-
mark. You use the anchor tag with the name attribute in the following format:
<a name=”anchor_name”> Some Text </a>
In this tag, “anchor_name” is the name you give the anchor, and “Some Text” is the
text being named as the anchor. Anchor names are case sensitive. When you create a
named anchor, Dreamweaver inserts an anchor icon into the Document window beside
the text. The anchor icon is not visible in a browser window.
After a location on a page has a named anchor, you can create links to it from other
locations in the same page or from other pages. For example, you can create an anchor
to the selected page heading text named “top,” type “back to the top” at the bottom of
the page, and then create a link from that text to the “top” anchor. This enables the user
to jump from the bottom to the top of the Web page by clicking the “back to the top”
link. The format for an anchor tag that links to a named anchor on the same page is:
<a href=”#anchor_name”> Link Text </a>
If you are linking to a named anchor in a different page, you need to include the path
and fi lename to the page containing the named anchor in the following general format:
<a href=”absolute or relative path#anchor_name”> Link Text </a>
The # symbol always precedes the anchor name when it is used in a link.
You'll look at the HTML for the hyperlinks you created in the home page.
To examine HTML tags for hyperlinks in the home page:
1. In the Document window, select the contact link.
2. On the Document toolbar, click the Split button. The page is in Split view with a
Code pane and a Design pane.
3. Split the screen vertically, if necessary, by checking Split Vertically in the View tab
of the application menu.
4. In the Code pane, examine the anchor tag that surrounds the selected text. See
Figure 3-13.
Figure 3-13
Anchor tag in the home page
opening anchor tag
with code wrapped
over two lines
selected link text
document
relative link
closing anchor tag
Search WWH ::




Custom Search