Sunday, 24 June 2012

html Anchor Tag


HTML Anchor Tag

HTML is composition of webpages. All pages are connected to each other. This connectivity in web performed by anchor tag. This tag is used for giving a reference to another page or resource. This tag vastly used in web programming.
 Syntex


 <a href="web page url">text to be display</a>
 
Anchor tag contains href attribute that define where to redirect users or url of another page. This tag is used in following situations.

Sending users on another page

we want to redirect user to another page then we simply gives url of that page in href attribute.

<a href="http://www.programmingduniya.com">Go on programming duniya</a>

Click to practice online example

Sending users on same page

This tag can be used to redirect user's on same page. If our page contains lot of text section and we provide users some convenient way to directly send them to desired text then we can use id of that text.

<a href="#id where to send">Go to top</a>







Go top

No comments:

Post a Comment