Html Hyperlinks

Advertisements

Prev Tutorial Next Tutorial

Html Hyperlinks

Hyperlinks are used to create links that allow the users to navigate from one page to another. To create hyperlinks use <a> tag. <a> tag have following attributes;

  • href: href attribute specifies the destination address like www.tutorial4us.com/html/
  • target: target attribute specifies where to open the linked document like open in new window, open in same window.

Example

<html>
<body>
Link open in same window<a href="#" target="_top">Click Here</a>
Link open in new window<a href="#" target="_blank">Click Here</a>
</body>
</html>

Result

Link open in same window Click Here
Link open in new window Click Here

Target Attribute

Target ValueDescription
_blankOpens the linked document in new window
_topOpens the linked document in same window
_selfOpens the linked document in same frame as it was clicked (this is default)
framenameOpens the linked document in a given named frame
_parentOpens the linked document in the parent frame

Image as Link

In html you can give image as a link, when click on image linked page will be open. In below example image link is provided.

Example

<html>
<body>
<a href="/html/index" target="_top"><img src="files/sublogo.png" target="_blank"></a>
</body>
</html>

Result

Browser supported

Element
<a>YesYesYesYesYes

Prev Tutorial Next Tutorial

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements