|
||
HTML uses a hyperlink to link to another document on the
Web. HTML uses the <a> (anchor) tag to create a link to another document. - The anchor tag tells the browser to set a hypertext
link for the designated text. The text will appear in a highlighted color
to indicate that it represents a link. When a reader clicks on the link,
the browser pulls up the specified page or file. The syntax of creating an anchor: <a href="url">Text to be displayed</a> The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink. The Target Attribute With the target attribute, you can define where the linked document will be opened. The line below will open the document in a new browser window: <a href="http://www.geocities.com/lea_abarentos/homepage" You can target a frame by a name you have assigned it. - "_blank" opens the new document in a new window. The Anchor Tag and the Name Attribute The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for. Below is the syntax of a named anchor: <a name="label">Text to be displayed</a> The name attribute is used to create a named anchor. The name of the anchor can be any text you care to use. |