Table of
|
The Anchor Tag and the href Attribute HTML uses the <a> (anchor) tag to create a link to another document. An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc. 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 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 specified section on a page, instead of letting the user scroll around to find what he/she is looking for. 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. <a name="tips">Read the Useful Tips section</a> You should notice that a named anchor does not display in a special way. Break out of a frame Create a mailto link Create a mailto link 2
|