HTML Guide
An </a>
end tag has been found to violate nesting rules. <a>
tags can’t include other <a>
tags inside. Most probable cause is an unclosed <a>
tag, like in this example:
<a href="one.html">Page 1
<a href="two.html">Page 2</a>
Related W3C validator issues
An end tag </code> has been found violating nesting rules. Check other errors in the same document related to the <code> element, and fix the unallowed nested elements.
An <a> tag can’t include other <a> tags inside. Most probable cause is an unclosed <a> tag, like in this example:
<a href="one.html">Page 1
<a href="two.html">Page 2</a>
The <iframe> HTML element represents a nested browsing context, embedding another HTML page into the current one.
As the iframe is a container that holds an embedded HTML page, it cannot be nested inside an a tag.
An <input> tag can’t be used inside an <a> tag.
A <label> tag can’t be used inside an <a> tag. Consider using other tags like <span>.
A <textarea> tag can’t be used inside an <a> tag.
A button element, or an element with the role=button attribute, is not allowed to be nested inside an <a> element.
An <a> element cannot contain a descendant element with the attribute tabindex.
The href attribute of an <a> element contains an invalid character, that should be properly encoded as a URI percent-encoded character.
The href attribute of the a element contains an invalid backslash character, which is not permitted in URLs.
According to the WHATWG HTML living standard, the href attribute must contain a valid URL. URLs use forward slashes (/) for path separators, and backslashes are not allowed as they can cause browsers and validators to misinterpret the address. Backslashes often arise when file paths are copied from Windows environments.
Correct Usage:
- Always use forward slashes / in your URLs.
- Remove any backslashes from href values.
Example of incorrect usage:
<a href="images\picture.jpg">View Picture</a>
Corrected example:
<a href="images/picture.jpg">View Picture</a>