Written by Philip
|
< Previous
|
Next >
|
|---|
In this tutorial you will be creating a HTML link or Hyperlink. While browsing the web you would of clicked on a HTML Link. A HTML Link is navigation that links a web page to another web page.
Remember that you can link a web page on site A to a web page on site B.
To create a simple HTML Link add the following HTML within your code.
<a href="http://www.how-to-code.com">How To Code</a>
Try It : Place the a element that defines the How To Code link, between your body tags within your website.
<html> <body> <div>Now lets go to < a href="http://www.how-to-code.com">How To Code</a></div> </body> </html>
Within a HTML link the href attribute specifies the web page to navigate to when the user clicks the link.
Try It: Try changing the href attribute from http://www.how-to-code.com to the name of your site, or another web page on the web.
The target attribute specifies which window the link will open in. You can open the link in a new window, the window the user is currently viewing, or in another frame within the web page.
<a href="http://www.how-to-code.com" target="_blank">How To Code</a>
The following are the target attributes that can be used, they specify which window the link will open in.
| Target | Description |
| _blank | Open the page a new window |
| _self | The default target, opens the page in the same frame as was clicked |
| _parent | Opens the webpage in the parent frame |
| _top | Open the document in the body of the window |
| framename | Open the document in a named frame |
|
< Previous
|
Next >
|
|---|