<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/XMLStylesDoc_xhtml10_en.xsl"?><!DOCTYPE document SYSTEM "/schemas/XMLStyles10.dtd">
<document xmlns="http://XMLStyles.com/namespaces/styles" xmlns:xst="http://XMLStyles.com/namespaces/styles" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:date="http://exslt.org/dates-and-times">
   <noxml>
      <p xmlns="http://www.w3.org/1999/xhtml"/>
      <!-- You are viewing the source.  The following message should be ignored if you did "View Source" in your browser. -->
      <p xmlns="http://www.w3.org/1999/xhtml">
ATTENTION: XML WEB PAGES NOT SUPPORTED
   If you see this message, your current browser does not support the
   1999 XSLT 1.0 (or later) standard for XML web pages such as this one.
   Please upgrade your browser to a newer version
   that supports 1999 or later standards such as:
      Mozilla Firefox version 1.0.2 or later (GetFirefox -&gt; http://www.GetFirefox.com/)
      Netscape version 8 or later
      Safari version 1.3 or later
      Opera version 9 or later
      Microsoft Internet Explorer (MSIE) version 5 or later
   For further assistance, contact the software vendor for your browser.
   To go to the X<!-- extended HTML -->HTML version of this page click the following link:
<a href="index.html">index.html</a>
      </p>
      <p xmlns="http://www.w3.org/1999/xhtml">&#160;</p>
   </noxml>
   <path>/tags/a-tag/</path>
   <site>HTML 5 Reference</site>
   <logo xlink:type="simple" xlink:href="/images/html-5.jpg" media="screen" width="156" height="27">HTML 5 Reference</logo>
   <logo xlink:type="simple" xlink:href="/images/html-5.jpg" media="print" width="156" height="27">HTML 5 Reference</logo>
   <logo xlink:type="simple" xlink:href="/images/html-5.jpg" media="handheld" width="150" height="17">HTML 5 Reference</logo>
   <navigation where="sections">
      <label>HTML 5 Reference</label>
      <link xlink:type="simple" xlink:href="/index.xml">Home</link>
      <link xlink:type="simple" xlink:href="/tutorial/index.xml">Tutorial</link>
      <link xlink:type="simple" xlink:href="/tags/index.xml">HTML5 Tags</link>
      <link xlink:type="simple" xlink:href="/attributes/index.xml">Attributes</link>
      <link xlink:type="simple" xlink:href="/css-styles/index.xml">CSS Styles</link>
      <link xlink:type="simple" xlink:href="/metatags/index.xml">Metatags</link>
      <link xlink:type="simple" xlink:href="/cheat-sheet/index.xml">Cheat Sheet</link>
      <link xlink:type="simple" xlink:href="/examples/index.xml">Examples</link>
      <link xlink:type="simple" xlink:href="/definitions/index.xml">Definitions</link>
      <link xlink:type="simple" xlink:href="/diffs/index.xml">Differences</link>
      <link xlink:type="simple" xlink:href="/avoid/index.xml">Avoid</link>
      <link xlink:type="simple" xlink:href="/faqs/index.xml">HTML5 FAQs</link>
      <link xlink:type="simple" xlink:href="/prod/rssfeeds.cgi">RSS Feeds</link>
      <link xlink:type="simple" xlink:href="/prod/help/index.cgi">Help</link>
   </navigation>
   <navigation where="left">
      <label>HTML 5 Reference</label>
      <link xlink:type="simple" xlink:href="/tutorial/index.xml">HTML Tutorial</link>
      <link xlink:type="simple" xlink:href="/tags/index.xml">HTML 5 Tags</link>
      <link xlink:type="simple" xlink:href="/attributes/index.xml">HTML Attributes</link>
      <link xlink:type="simple" xlink:href="/css-styles/index.xml">CSS Styles</link>
      <link xlink:type="simple" xlink:href="/metatags/index.xml">HTML Metatags</link>
      <link xlink:type="simple" xlink:href="/cheat-sheet/index.xml">Cheat Sheet</link>
      <link xlink:type="simple" xlink:href="/examples/index.xml">HTML Examples</link>
      <link xlink:type="simple" xlink:href="/definitions/index.xml">Definitions</link>
      <link xlink:type="simple" xlink:href="/diffs/index.xml">HTML 5 Changes</link>
      <link xlink:type="simple" xlink:href="/avoid/index.xml">Things to Avoid</link>
      <link xlink:type="simple" xlink:href="/faqs/index.xml">HTML 5 FAQs</link>
      <link xlink:type="simple" xlink:href="/prod/help/index.cgi">Help</link>
      <link xlink:type="simple" xlink:href="/prod/help/index.cgi?p=about">About</link>
   </navigation>
   <section type="body">
      <pages name="index">
         <navigation where="pages">
            <label>index</label>
            <link xlink:type="simple" xlink:href="index.xml">index</link>
            <link xlink:type="simple" xlink:href="rel-alternate.xml">rel="alternate"</link>
            <link xlink:type="simple" xlink:href="rel-archives.xml">rel="archives"</link>
            <link xlink:type="simple" xlink:href="rel-author.xml">rel="author"</link>
            <link xlink:type="simple" xlink:href="rel-bookmark.xml">rel="bookmark"</link>
            <link xlink:type="simple" xlink:href="rel-external.xml">rel="external"</link>
            <link xlink:type="simple" xlink:href="rel-feed.xml">rel="feed"</link>
            <link xlink:type="simple" xlink:href="rel-help.xml">rel="help"</link>
            <link xlink:type="simple" xlink:href="rel-index.xml">rel="index"</link>
            <link xlink:type="simple" xlink:href="rel-license.xml">rel="license"</link>
            <link xlink:type="simple" xlink:href="rel-nav.xml">rel="nav"</link>
            <link xlink:type="simple" xlink:href="rel-nofollow.xml">rel="nofollow"</link>
            <link xlink:type="simple" xlink:href="rel-noreferrer.xml">rel="noreferrer"</link>
            <link xlink:type="simple" xlink:href="rel-search.xml">rel="search"</link>
            <link xlink:type="simple" xlink:href="rel-sidebar.xml">rel="sidebar"</link>
            <link xlink:type="simple" xlink:href="rel-tag.xml">rel="tag"</link>
         </navigation>
         <navigation media="handheld" where="up">
            <link xlink:type="simple" xlink:href="../index.mobile.html">HTML Tags</link>
         </navigation>
         <navigation media="handheld" where="next">
            <link xlink:type="simple" xlink:href="../abbr-tag/index.mobile.html">The &lt;abbr&gt; Tag</link>
         </navigation>
         <page id="N100AC" name="index">
            <title>HTML &lt;a&gt; Anchor Tag</title>
            <subpage id="N100B0" name="reference">
               <title>The &lt;a&gt; Anchor Tag</title>
               <h2>The <code>&lt;a&gt;</code> placeholder link (anchor tag) in HTML 5</h2>
               <p>The <code>&lt;a&gt;</code> tag is used to define a hypertext link.
               </p>
            </subpage>
            <h3>Converting to HTML 5</h3>
            <p>We are working on <link xlink:type="simple" xlink:href="../../tutorials/converting-to-html-5.html">converting to HTML 5</link>.
               Please visit <link xlink:type="simple" xlink:href="../a-tag/index.html">HTML &lt;a&gt; Tag</link> on the
               <link xlink:type="simple" xlink:href="http://www.HTML-5.com/index.html">HTML 5 standard</link> version of this site.
            </p>
            <subpage id="N100D1" name="syntax">
               <label>Syntax</label>
               <title>&lt;a&gt; Tag Syntax</title>
               <h3>Syntax of the &lt;a&gt; tag</h3>
            </subpage>
            <subpage id="N100D9" name="attributes">
               <label>Attributes</label>
               <title>Attributes of the &lt;a&gt; Tag</title>
               <h3>Attributes of the &lt;a&gt; tag</h3>
               <dl>
                  <di id="href-attribute">
                     <dt>
                        <code>href</code> attribute</dt>
                     <dd>
                        <p>If the value of the <code>href</code> attribute is a
                           <acronym term="Universal Resource Locator">URL</acronym>,
                           it may contain any of the following components:
                        </p>
                        <ol>
                           <li>protocol scheme, typically "http:" or "https:"</li>
                           <li>host name or <acronym term="Internet Protocol">IP</acronym> address</li>
                           <li>port number, which defaults to 80 for the
                              <acronym term="Hypertext Transfer Protocol">HTTP</acronym> protocol
                           </li>
                           <li>absolute or relative path</li>
                           <li>search query, indicated by "?"</li>
                           <li>fragment identifier, indicated by "#"</li>
                        </ol>
                        <p>If the protocol scheme, host name/IP address and port number are omitted the
                           default is the current host - the same server handling the current document.
                           If the path starts with a slash <code>/...</code>, it is
                           an absolute path from the base of the current document,
                           which defaults to the document root directory on the server.
                           A URL with a "#" but no fragment identifier points to the top of the document.
                        </p>
                        <blockcode>
                           <l>&lt;a href="#"&gt;back to top&lt;/a&gt;</l>
                           <l>&lt;a href="another-page.html"&gt;another page&lt;/a&gt;</l>
                           <l>&lt;a href="/another-section/"&gt;another section&lt;/a&gt;</l>
                           <l>&lt;a href="http://www.ExampleOnly.com/"&gt;Example Only&lt;/a&gt;</l>
                        </blockcode>
                     </dd>
                  </di>
                  <di id="id-attribute">
                     <dt>
                        <code>id</code> attribute</dt>
                     <dd>The <code>id</code> attribute
                     </dd>
                  </di>
                  <di>
                     <dt>common attributes</dt>
                     <dd>In addition to the attributes above, which are specific to the &lt;a&gt; tag, any of the
                        <link xlink:type="simple" xlink:href="../../attributes/">common HTML attributes</link>
                        can also be used.
                     </dd>
                  </di>
               </dl>
            </subpage>
            <subpage id="N1012A" name="a-rels">
               <label>rel=</label>
               <title>Relationships for the HTML 5 &lt;a&gt; Tag</title>
               <h3>&lt;a&gt; tag relationships</h3>
               <p>The <code>rel</code> values for the &lt;a&gt; tag are:
               </p>
               <dl>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-alternate.xml">alternate</link>
                     </dt>
                     <dd>Links to an alternate representation of the document.
For example:
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-archives.xml">archives</link>
                     </dt>
                     <dd>Links to previously created versions of related documents, such as the archives of a blog.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-author.xml">author</link>
                     </dt>
                     <dd>Links to a document about the author of the document in which the link tag appears.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-bookmark.xml">bookmark</link>
                     </dt>
                     <dd>Provides a permanent link to the document or a section within the document.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="#contact">contact</link>
                     </dt>
                     <dd>Links to a document with contact information.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-external.xml">external</link>
                     </dt>
                     <dd>Indicates that the link is to a resource on a different web site.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-feed.xml">feed</link>
                     </dt>
                     <dd>Links to a syndicated feed channel for the document or the web site.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-nav.xml#first">first</link>
                     </dt>
                     <dd>Links to the first document in a series of articles.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-help.xml">help</link>
                     </dt>
                     <dd/>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-index.xml">index</link>
                     </dt>
                     <dd>Links to an index document or a table of contents for the
                        collection of documents that includes the document in which the link tag appears.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-nav.xml#last">last</link>
                     </dt>
                     <dd>Links to the last document in a series of articles.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-license.xml">license</link>
                     </dt>
                     <dd>Links to a document that describes the copyright license that applies
                        to the document(s) in which the link to the license page appears.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-nav.xml#next">next</link>
                     </dt>
                     <dd>Links to the next document in sequence.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-nofollow.xml">nofollow</link>
                     </dt>
                     <dd>Indicates to search engine crawlers and other robots that they
                        should not follow the link to the referenced resource and process the document there.
                        This can be used to indicate that the linked document should not be considered to be
                        a recommended resource when determining the search engine rank for the linked page.
                        This may help the page where the link appears from being penalized for
                        "recommending" less desirable pages, such as for links to an affiliate site.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-noreferrer.xml">noreferrer</link>
                     </dt>
                     <dd>Indicates that the user agent should not identify the referring page
                        to the server handling the request for the target page.
                        If this value is omitted or ignored, the
                        <acronym term="Uniform Resource Locator">URL</acronym> of the page
                        containing the link will most likely be included in the <code>Referer</code>[sic]
                        header of the <acronym term="Hypertext Transfer Protocol">HTTP</acronym>
                        request for the referenced page.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-nav.xml#prev">prev</link>
                     </dt>
                     <dd>Links to the previous document in the series.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-search.xml">search</link>
                     </dt>
                     <dd>Links to a search page for the web site or a subset of documents
                        that includes the document in which the search link appears.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-sidebar.xml">sidebar</link>
                     </dt>
                     <dd>Indicates that the referenced document should be loaded into the
                        web browser's sidebar if the link is activated by the user.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-tag.xml">tag</link>
                     </dt>
                     <dd>Specifies a <acronym term="Universal Resource Identifier">URI</acronym>
                        that is a "tag", which describes the subject of a page.  The tag may
                        be a <acronym term="Universal Resource Locator">URL</acronym>,
                        which leads to a web-accessible page, or just a standalone identifier.
                     </dd>
                  </di>
                  <di>
                     <dt>
                        <link xlink:type="simple" xlink:href="rel-nav.xml#up">up</link>
                     </dt>
                     <dd>Links to the document at the next higher level in a tree hierarchy.
                     </dd>
                  </di>
               </dl>
            </subpage>
            <subpage id="examples" name="examples">
               <label>Examples</label>
               <title>HTML 5 Examples</title>
               <h3>Examples of the <code>a</code> tag in HTML 5</h3>
               <h3>The &lt;a&gt; tag for HTTP hypertext links</h3>
               <blockcode>
                  <l>&lt;a href=""&gt;&lt;/a&gt;</l>
               </blockcode>
               <h3>The &lt;a&gt; tag for other <acronym term="Universal Resource Identifier">URI</acronym> protocols</h3>
               <blockcode>
                  <l>&lt;a href="tel:+17775551234"&gt;Call Me at +1-777-555-1234&lt;/a&gt;</l>
               </blockcode>
            </subpage>
            <subpage id="differences" name="differences">
               <label>Differences</label>
               <title>Changes in HTML 5</title>
               <h3>What's new in HTML 5</h3>
               <h3>Differences between HTML 5 and earlier versions</h3>
               <p>The <code>media</code> attribute has been added for consitency with the
                  <link xlink:type="simple" xlink:href="../link-tag/">&lt;link&gt; tag</link>
               </p>
               <p>The following attributes should <i>not</i> be coded on the &lt;script&gt; tag
                  because they either have been deprecated or were never officially supported:
               </p>
               <ul>
                  <li>
                     <span style="text-decoration: line-through">name</span> - use the
                     <link xlink:type="simple" xlink:href="#id-attribute">
                        <code>id</code> attribute</link> instead
                  </li>
               </ul>
               <p>In HTML 5, you can put the &lt;a&gt; tag around block elements in addition to
                  inline elements. This means that links can appear where they couldn't before.
                  For example, you can turn a whole
                  <link xlink:type="simple" xlink:href="../tr-tag/">HTML table row</link> into a link:
               </p>
               <blockcode>
                  <l>&lt;table&gt;</l>
                  <l>   &lt;tr&gt;&lt;td&gt;Label:&lt;/td&gt;&lt;td&gt;Data...&lt;/td&gt;&lt;/tr&gt;</l>
                  <l>   ...</l>
                  <l>   &lt;tr onclick="location=this.getElementsByTagName('a')[0]"&gt;</l>
                  <l>      &lt;a href="new-row.html"/&gt;</l>
                  <l>      &lt;td colspan="2"&gt;Add a Row&lt;/td&gt;</l>
                  <l>   &lt;/tr&gt;</l>
                  <l>&lt;/table&gt;</l>
               </blockcode>
            </subpage>
            <updated local="2010-09-19">Sunday September 19, 2010</updated>
         </page>
      </pages>
   </section>
   <copyright>Copyright © 2010 Accilent<span class="sup">®</span> Corp. Alteration of content, including addition of any function such as hypertext links or pop-up advertising, or interference with the hypertext links or other functions of this site is expressly prohibited.</copyright>
   <disclaimer>All information, links, forms, applications and other items on this site or obtained from it are provided <b>AS IS</b>, WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</disclaimer>
</document>

