HTML Guide
The attribute st_title
is not allowed on <span>
elements.
This issue is commonly caused by an old integration of ShareThis via Drupal or other CMS - the old code used invalid attributes like displayText
, st_url
and st_title
which were later changed to HTML5 custom data attributes.
Learn more:
Related W3C validator issues
The <span> element does not have a currency attribute. Consider using custom data attributes instead, like data-currency.
The attribute displayText is not allowed on <span> elements.
This issue is commonly caused by an old integration of ShareThis via Drupal or other CMS - the old code used invalid attributes like displayText, st_url and st_title which were later changed to HTML5 custom data attributes.
The attribute st_url is not allowed on <span> elements.
This issue is commonly caused by an old integration of ShareThis via Drupal or other CMS - the old code used invalid attributes like displayText, st_url and st_title which were later changed to HTML5 custom data attributes.
The <table> element does not accept a height attribute. Use CSS instead.
Check the syntax of the affected tag, it’s probably malformed and a < character inside has been interpreted as an attribute.
For example, this code might cause this issue:
<!-- Malformed img tag -->
<img src="photo.jpg" alt="smiling cat" < />
<!-- Fixed img tag -->
<img src="photo.jpg" alt="smiling cat" />
An invalid attribute has been found on an element. Check the affected tag to ensure attributes are well-formed, and if they are you can consider using custom data attributes.
The xmlns:dt attribute is not permitted on standard HTML elements according to the HTML specification.
HTML5 does not use XML namespaces like xmlns:dt, which are only valid in certain XML vocabularies such as XHTML or when embedding MathML or SVG. In typical HTML, attributes with xmlns or any custom XML namespace prefixes are invalid and cause validation errors.
To fix this issue, simply remove the xmlns:dt attribute from your HTML tags.
If you are using a data attribute or a custom attribute, you can use data-* attributes instead, which are allowed in HTML5.
Incorrect usage with xmlns:dt:
<div xmlns:dt="urn:schemas-microsoft-com:datatypes">
Content here
</div>
Correct usage—attribute removed:
<div>
Content here
</div>
If you need to store custom data, use data-* attributes:
<div data-dt="urn:schemas-microsoft-com:datatypes">
Content here
</div>
Avoid using XML namespaces in HTML5 documents to ensure your code is standards-compliant.
The xmlns:m attribute is not permitted on the html element in HTML5 documents.
HTML5 allows only certain attributes on the html element, specifically lang and dir (and the standard xmlns in XHTML serialization contexts), but not custom XML namespaces like xmlns:m. The xmlns:m attribute is typically used in XML-based documents (such as MathML or Office markup) and is not valid in standard HTML5 syntax.
To resolve the error, remove the xmlns:m attribute from the html element. If you need to use namespace-prefixed elements or attributes (such as for Office documents or MathML), you should use XHTML serialization (served as application/xhtml+xml) or rework your markup to be fully compatible with HTML5 without custom namespaces.
Incorrect usage:
<!DOCTYPE html>
<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
<head>
<title>Invalid Namespace Example</title>
</head>
<body>
<!-- Content here -->
</body>
</html>
Correct HTML5 usage:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Valid HTML Example</title>
</head>
<body>
<!-- Content here -->
</body>
</html>
If you require namespaces for specific elements (like MathML), use them directly without declaring a namespace on the html element, or switch to XHTML if your application truly requires namespace declarations. For most web applications, sticking to standard HTML5 elements and attributes ensures maximal compatibility and validator compliance.
The xmlns:v attribute is not valid on the html element in HTML5.
HTML5 does not support custom XML namespaces like xmlns:v, which was used in old versions of Internet Explorer for VML (Vector Markup Language). The xmlns:v attribute is unnecessary and should be removed to make your HTML valid.
Example before (invalid HTML):
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>VML Example</title>
</head>
<body>
<!-- content -->
</body>
</html>
Example after (valid HTML):
<!DOCTYPE html>
<html lang="en">
<head>
<title>VML Example</title>
</head>
<body>
<!-- content -->
</body>
</html>
For vector graphics in modern HTML, use the svg element instead of legacy VML.
A span element that conveys special meaning or interactive state must have appropriate ARIA attributes or role to be accessible and pass validation.
The span element is a generic inline container with no semantic meaning. To make it meaningful for assistive technologies (such as screen readers), ARIA attributes or a role attribute should be used when the element represents states, properties, or interactive features.
For example, in the following code the span is used to visually indicate a required field with an asterisk *, but it lacks additional semantic information:
<span class="required" aria-required="true"> *</span>
To address this, add role="presentation" (to mark it as purely visual), or use aria-hidden="true" (to hide it from assistive technology), as the asterisk does not have semantic value for screen readers. Only use ARIA required (aria-required="true") on the form control (e.g., input), not on the decorative indicator.
Recommended HTML (decorative asterisk not announced):
<span class="required" aria-hidden="true">*</span>
Alternative (if you want to announce “required”): Announce “required” with visually hidden text and use the actual aria-required="true" on the input.
<label for="name">
Name
<span class="required" aria-hidden="true">*</span>
<span class="visually-hidden">Required</span>
</label>
<input id="name" name="name" aria-required="true">
This approach ensures accessibility, semantic correctness, and W3C HTML validation compliance.