HTML Working with Links

free php tutorials, php classes, php utilities, free tools

Using Links user can visit different pages and files. Both text and images are able to be used as a link source. For example, when a user visits any website. after read a page he can reach any other page using links. <A> tag is used for link which has main attribute href which is used for link any web page or url, For Example

<A href="index.html">My Links</A>

 

In this example, when user click on My Links, he will redirect on index.html

My Links

Below example is hyperlinks with images, in this example, when user clicks on image, user will redirect on index.html

The Target Attribute
Using target attribute, you can define where the linked document will be opened. The line below will open the document in a new browser window:

<a href="http://www.programmersbank.com.com/" target="_blank">Programmersbank.com</a>

There are many types of links:

  • Local Links
  • Internal Links
  • External Links
  • Email Links

Local links
The internal is very useful for long pages.

<a href="viewpolls.html">Polls</a>

Internal links
The INTERNAL link is useful for long pages. This creates a link that points to another spot on the same page.

External Links
External links are used another URL/Website as the target. Before anchor any URL, put http:// before URL address.

<a href="http://www.nicefun.com">More Fun</a>

Email Links
The Email link is used for receive email from visitors. The following will open your email client (like microsoft outlook) with the email.

< a href="mailto:rashidahmed14@gmail.com" >Click here for email</a>

Bookmark This Page