About Us

Breaking News

Recent Post

Featured Articles

Saturday, April 19, 2014

Anchor tag (HTML)

<Anchor>

This element defines hyperlink,the named target destination for a hyperlink.Or both



1)
  Add Anchor Tags to jump to specific location on a page.

Including an Anchor tag with in a post or page,you can place links in the body of your
post which when clicked allow the reader to jump to another location on the page.



The Anchor tag will consist of two HTML elements.


If you are linking to a spot on the same page, the format of the link will be similar to:


Example-           <a href ="#Anchor">Link Text</a>




2)
  You can create link to a named Anchor by using the name attribute (or the id Attribute).

Example-           <a id="bookmarks" name="bookmarks">id and name attribute</a>







3)
  When you linking with in the same document, the A element is set as follows.




4) 
  When linking to an Anchor on a page you need to put a # in front of the Anchor.


you link an Anchor on the same page,simply enter


Example- <a href="#Anchor">Internal Link</a>




5) 
  For External links

Example-

<a href="http://www.google.com/">External Link</a>






ELEMENT-SPECIFIC ATTRIBUTES





1) charset-       <a charset="urf-8" href="http://www.google.com/">charset Attribute</a>


2) coords-        <a href="curve.html" shape="circle" coords"90,50,3"> coords Attribute</a>


3) href-          <a href="http://www.google.com/">href Attribute</a>

4) hreflang-     <a hreflang="en" href="http://www.google.com/">hreflang attribute</a>


5) methods-      <form action="index.html" method="get"></form>,<form action="index.html" method="post"></form>


6) name-           <meta name="author" content="text">


7) rel-               <a rel="nofollow" href="http://www.google.com/">rel attribute</a>


8) rev-             <a rev="nofollow" href="http://www.google.com/">rev attribute</a>


9) shape-           <a href="love.html" shape="circle" coords"90,50,3"> shape Attribute</a>





RELATIONSHIP VALUES





1) alternate-          <a href="hello.html" rel="alternate" lang="fr">version francais</a>


2) archives-             <a href="/history.php" rel="archives">Document history</a>


3) author-                <a href="/tap.html" rel="author">new Author</a>


4) bookmark-             <a href="index.html" rel="bookmark" title="permalink">Section parmalinks</a>


5) external-               <a href="https://ajaxref.com/" rel="externalauthor">Ajax book(offsite)</a>


6) first-                      <a href="page1.html" rel="first">Start</a>


7) help-                      <a href="help.html" rel="help">Help</a>


8) index-                     <a href="docindex.html" rel="index">Index</a>


9) last-                        <a href="page10.html" rel="last">Last</a>


10) license-                 <a href="legal.html" rel="license">Legal Terms</a>


11) next-                     <a href="page2.html" rel="next">Next page</a>


12) nofollow-                <a href="legal.html" rel="nofollow license">Legal info</a>


13) noreferrer-          <a href="https://banker.com" rel="noreferrer">banker</a>


14) prev-               <a href="page1.html" rel="previous">previous</a>


15) search-            <a href="search/" rel="search">search site</a>


16) sidebar-            <a href="instructions.html" rel="sidebar">Load
 Instructions(Sidebar)</a>


17) tag-               <a href="html5.html" rel="tag">HTML5</a>


18) up-                <a href="/main/index.html" rel="up">Index page</a>




GO RIGHT TO THE TOP


To return the top of the page from any point on the page,create a name anchor at the very top of your page (insert it right after the <body> tag) note if does not have to enclose text.




Example- <a name="top"></a>

At the end of the section on page,insert the link
<a href="#top">top</a>

No comments:

Post a Comment

About Us

BLOG HTMLHOUR WWW.HTMLHOUR.COM

Gallery

Find Us On Facebook