Hyperlinks in HTML
Html hyperlink is use to jump to any other page or to any other location in the current page. You can add hyperlink to any word or group of words or images. On mouse over any hyperlink your mouse courser change to a little hand. Links are specified in HTML using the <a> tag. To assign style to ahyperlink please visit CSS Tutorial.
HTML Link Syntax:
<a href="index.php">Home</a>
HTML – Link Targets
The attribute target use to set weather you want to open the link in a new window or in the same window.
Target | |
_blank | Opens page in a new browser window/ New tab |
_self | Opens the page in same window |
_parent | Opens the page in the parent frame |
_top | Opens the page in same window, canceling all frames |
<a href="index.php" target="_blank">Home</a> <a href="index.php" target="_self">Home</a> <a href="index.php" target="_parent">Home</a> <a href="index.php" target="_top">Home</a>
HTML Email Link
<a href="mailto:a2zwebhelp@gmail.com">Contact Us</a>
Assign Subject and Body to HTML Email Link
<a href="mailto:a2zwebhelp@gmail.com?subject=my Question&body=Test"> Contact Us</a>
Default Links/ Base Link
The base tag used in the head element to set a default URL for all links on a page.
<head> <base href="http://www.a2zwebhelp.com/" /> </head>