title: Are there any browser issues with <a> tags that lack an href attribute?
body: <p>Context: Currently, Wt (Web Toolkit) will render a WAnchor object as a <code>&lt;span&gt;</code> tag rather than an <code>&lt;a&gt;</code> tag if the link that the anchor should point to, is empty.</p>
  
  <p>However, there are some problems with this approach, notably that it adds unnecessary complexity to CSS styling (when using Twitter Bootstrap, for example).</p>
  
  <p>I've been involved in a discussion with one of the Wt developers proposing a patch to change this behavior: <a href="http://redmine.emweb.be/issues/1348" rel="nofollow">http://redmine.emweb.be/issues/1348</a></p>
  
  <p>He noted that the current behavior was implemented as a result of certain browsers having problems rendering <code>&lt;a&gt;</code> tags without an <code>href</code> attribute (possibly older mobile browsers?).</p>
  
  <p>According to the official HTML specifications, there is no problem with this:</p>
  
  <ul>
  <li><a href="http://dev.w3.org/html5/spec/single-page.html#the-a-element" rel="nofollow">http://dev.w3.org/html5/spec/single-page.html#the-a-element</a> <em>If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant.</em></li>
  <li><a href="http://www.w3.org/TR/html401/struct/links.html#edef-A" rel="nofollow">http://www.w3.org/TR/html401/struct/links.html#edef-A</a> <em>Authors may also create an A element that specifies no anchors, i.e., that doesn't specify href, name, or id. Values for these attributes may be set at a later time through scripts.</em></li>
  </ul>
  
  <p>And as far as I am aware...</p>
  
  <pre><code>&lt;a&gt;Link&lt;/a&gt; // OK
  &lt;a href&gt;Link&lt;/a&gt; or &lt;a href=""&gt;Link&lt;/a&gt; // Undefined? (but common behavior is to navigate to the current URL)
  &lt;a href="/items"&gt;Link&lt;/a&gt; // OK
  </code></pre>
  
  <p>I also checked the following document with the W3C HTML5 validator:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;a&gt;Example of an anchor with no href attribute.&lt;/a&gt;
  &lt;a href&gt;Example of an anchor with a null href attribute.&lt;/a&gt;
  &lt;a href=""&gt;Example of an anchor with an empty string href attribute.&lt;/a&gt;
  &lt;a href="http://www.google.com/"&gt;Example of an anchor that links to Google.&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I received one warning:</p>
  
  <blockquote>
    <p><code>Line 9, Column 8: Attribute href without an explicit value seen. The
    attribute may be dropped by IE7. &lt;a href&gt;Example of an anchor with a
    null href attribute.&lt;/a&gt;</code></p>
  </blockquote>
  
  <p>So my question is: are there any known situations where the <strong>total</strong> lack of an <code>href</code> attribute on an <code>&lt;a&gt;</code> tag causes problems in certain browsers? IE? Mobile Safari?</p>