# HTML Links
● HTML Links - HyperLinks
HTML Links are hyperlinks. User can click on a link and jump to another document. When user move the mouse over a link, the mouse arrow ill turn into a little hand.
● HTML Links - Syntax
In HTML, links are defined with the <a> tag.
The href attribute specifies the destination address of the link. The link text is the visible part. Clicking on the link text will send user to the specified address.
● Local Links
The example above used an absolute URL. A local link is specified with a relative URL.
● HTML Link Colors
By default, a link will appear like this.
- An unvisited link is underlined and blue
- A visited link is underlined and purple
- An active link is underlined and red
Programmer can change the default colors, by using styles.
● HTML Links - The target Attribute
The target attribute specifies where to open the linked document.
The target attribute can have one of the following values.
- _blank - Opens the linked document in a new window or tab
- _self - Opens the linked document in the same window/tab as it was clicked (this is default)
- _parent - Opens the linked document in the parent frame
- _top - Opens the linked document in the full body of the window
- framename - Opens the linked document in a named frame
● HTML Links - Image as Link
It is common to use image as links.
● HTML Links - Create a Bookmark
HTML bookmarks are used to allow readers to jump to specific parts of a Web page.
Bookmarks can be useful if your webpage is very long.
To make a bookmark, you must first create the bookmark, and then add a link to it.
When the link is clicked, the page will scroll to the location with the bookmark.
Bookmarks can be useful if your webpage is very long.
To make a bookmark, you must first create the bookmark, and then add a link to it.
When the link is clicked, the page will scroll to the location with the bookmark.
● External Paths
External pages can be referenced with a full URL or with a path relative to the current web page.
No comments:
Post a Comment