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:
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.
This anchor defines a link to Hostedware:
here to visit Hostedware's home page</a>
The line above will look like this in a browser:
to visit Hostedware's home page
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:
Back to HTML Basics