php tutorial


php tutorial

This section introduces hyperlink (or link, or url), an anchor tag or a <a href= is how we make hyperlinks in HTML. Suppose we want to move from one page to another page or another website by clicking on text or image.

Tag look like
<a href=””>Text or Image </a>

Note: The default behavior associated with a link is the retrieval of another web resource.
Need To Remeber

Mainly anchor tag or <a support frequently used browsers like chrome, Internet Explorer, Firefox, Safari, and Opera.

List of Anchor Tag's Attributes for HTML
Optional AttributesDefinition
hrefCan be used to specify the target link
charsetcan be used to establish the character set of the target of a link
typeCan be used to specify the MIME (Multi-Purpose Internet Mail Extension) type of the target of a link.
hreflangCan be used to specify the language (in the form of of a language code) of the target of a link.
relCan be used to specify the relationship of the target of the link to the current page.
targetThis attribute indicates where to display the linked resource.
Below mention keywords have special meanings
  • _self : It is the default in current browsing context. Opens the window in the same frame.
  • _blank : display a new window and show the relevant data.
  • _top : display the linked document in the whole body of the window.
  • _parent : Opens data in the size of parent window.
revCan be used to specify the relationship of the current page to the target of the link.
accesskeyCan be used to associate a keyboard short-cut to the element.
tabindexCan be used to specify where the element appears in the tab order of the page.
Example :
<a href=””> Link to page </a>

Hyper Links in HTML Page:
<a href=”mypage.html”> Link to page </a>
<a href=”#section”> Link into page </a>