Full width home advertisement

How To

Science

Post Page Advertisement [Top]


What are Hyperlinks?

Hyperlinks are clickable linking text or image placed on a webpage that takes a user to another page or a specific section of a particular page. 

Hyperlinks allows visitors to navigate or browse between Web sites by clicking on words, phrases or images, so that hyperlinked can be created using words, text or images. 

A link tag is declared using: <a href>

<a href="page URL" ... other attributes-list>Link Text</a>

Example

We are using this link as an example http://www.scholarsglobe.com

<!DOCTYPE html>

<html>

<head>

<title>Scholars Hyperlink Example</title>

</head>

<body>

<p>Click Here</p>

<a href="http://www.scholarsglobe.com" >Scholars Globe</a>

</body>

</html>

Result:

Click Here

Scholars Globe



The Link Attributes

The target Attribute

This target attribute is used to point to the location where linked web document or web page is to be opened.

Option
Description
_self
Opens the linked document in the same frame.
_blank
Opens the linked document in a new window or tab.
_top
Opens the linked document in the full body of the window.
_parent
Opens the linked document in the parent frame.
targetframe
Opens the linked document in a named targetframe.



The below example contains all the type attributes options for html links attributes:

Example

<!DOCTYPE html>

<html>

<head>

<title>Scholars Hyperlink Example</title>

</head>

<body>

<p>Click any of the following links</p>

<a href="url" target="_blank">Opens in New Window</a>

<a href="
url" target="_self">Opens in Self  Window</a>  

<a href="
url" target="_parent">Opens in Parent Window</a> 

<a href="/html/index.html" target="_top">Opens in Body
 Window</a> 

</body>

</html>

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib