HTML Links
It is a connection from one web resource to another.A link has two ends,An anchor and direction. The link starts at the "source" anchor and points to the "destination" anchor, which may be any Web resource such as an image, a video clip, a sound bite, a program, an HTML document or an element within an HTML document.
Eg: <a href="url">link text</a>
The most important attribute of the <a> element is the href attribute, which indicates the link's destination.
The link text is the part that will be visible to the reader.
Clicking on the link text, will send the reader to the specified URL address.
"title" attribute contains additional information about the link, such as which kind of information the page contains.
Internal link: An internal link is used in the html document to navigate within the same web page.
External link: An external link is used to interconnect two html web pages.
HTML Links - The target Attribute
By default, the linked page will be displayed in the current browser window. To change this, we must specify another target for the link.
The target attribute specifies where to open the linked document.
The target attribute can have one of the following values:
- _self - Default. Opens the document in the same window/tab as it was clicked
- _blank - Opens the document in a new window or tab
- _parent - Opens the document in the parent frame
- _top - Opens the document in the full body of the window