HTML Checking for Large Sites
Rocket Validator automatically checks your pages on the W3C Validator.
Bad value “tel: X” for attribute “href” on element “a”: Illegal character in scheme data: space is not allowed.
The href
attribute on an <a>
link contains a space character, which is not allowed. If you’re trying to link to a phone URL, review the href
attribute to remove unallowed characters, as in this example:
<!-- Invalid as it contains a space character -->
<a href="tel: +123456789">call me</a>
<!-- Valid -->
<a href="tel:+123456789">call me</a>
Source:
Related W3C validator issues
The maxlength
attribute can be used on an input
element to define a client-side validation for the maximum length allowed on an input without resorting to JavaScript.
This attribute is only allowed on elements of type email
, password
, search
, tel
, text
, or url
.
The minlength
attribute can be used on an input
element to define a client-side validation for the maximum length allowed on an input without resorting to JavaScript.
This attribute is only allowed on elements of type email
, password
, search
, tel
, text
, or url
.
The minlength attribute defines the minimum number of characters (as UTF-16 code units) the user can enter into an <input>
or <textarea>
. This must be an integer value 0 or higher. If no minlength is specified, or an invalid value is specified, the input has no minimum length. This value must be less than or equal to the value of maxlength, otherwise the value will never be valid, as it is impossible to meet both criteria.
Here’s an example:
<label for="name">Enter your name (max 25 characters)</label>
<input type="text" minlength="25" id="name">
Learn more:
The pattern
attribute is only allowed on input whose type
is email
, password
, search
, tel
, text
or url
. Check the type
used, and consider changing to one of the allowed types to enable pattern client-side validation.
The pattern
attribute is a handy way of adding client-side validation on HTML forms without resorting to JavaScript. Check out this article to learn more about Input Pattern.
The boolean required
attribute can only be used with certain types of inputs. Check the input type is one of the allowed.
The required
attribute, if present, indicates that the user must specify a value for the input before the owning form can be submitted.
Learn more:
An <a>
element has been found with an invalid href
attribute, containing more than one #
adjacent character.
The #
is used to separate the fragment part of an URI (typically used to indicate a section within a document). For example, this is a valid link to a URI containing a fragment:
<a href="https://example.com/faqs#pricing">pricing</a>
The next example is invalid because it contains two adjacent #
characters, so that the fragment part would be #pricing
instead of pricing
:
<a href="https://example.com/faqs##pricing">pricing</a>
Learn more:
The href
attribute of an <a>
element contains an invalid character, that should be properly encoded as a URI percent-encoded character.
Learn more:
The href
attribute on the link
element must not be empty.
The href
attribute on an a
tag expects a valid URL, but only http://
was found.
<a>
tags can be used to link to an email address using the mailto
protocol in the href
attribute. Ensure that there is no space in the email address.
<a href="mailto: liza@example.com">This is wrong as it contains an space</a>
<a href="mailto:liza@example.com">This is OK</a>
The value tel-national
cannot be used on the attribute autocomplete
of an <input>
element of type tel
. Either change to type="text"
, or use autocomplete="tel"
. Examples:
<!-- Using autocomplete "tel-national" on type "tel" is invalid -->
<input name="phone1" type="tel" autocomplete="tel-national" />
<!--Using autocomplete "tel-national" on type "text" is valid -->
<input name="phone2" type="text" autocomplete="tel-national" />
<!--Using autocomplete "tel" on type "tel" is valid -->
<input name="phone3" type="tel" autocomplete="tel" />
Read more about the autocomplete attribute.
Space characters are not allowed in href
attributes. Instead, they should be converted to %20
. In this example, the first line is invalid and the second is valid:
<a href="https://example.com#some term">invalid</a>
<a href="https://example.com#some%20term">valid</a>
The href
attribute on an element <a>
contains a character that is not allowed, and should be encoded.
Some typical examples include the pipe character |
that should be replaced by its encoded alternative %7C
, and the left square bracket [
that needs to be encoded as %5B
.
The href
attribute on an <a>
tag contains an space, which is not allowed. Consider replacing space characters with “%20”.
The at symbol (@
) should be percent-encoded as %40
in order to include it at an href
attribute.
The href
attribute on an element <link>
contains a character that is not allowed, and should be encoded.
Some typical examples include the pipe character |
that should be replaced by its encoded alternative %7C
, and the left square bracket [
that needs to be encoded as %5B
.
The <a>
element requires either a href
attribute, or a role
attribute.
Learn more:
Attributes in HTML elements need to be separated by space, in this example the first line is invalid and the second one is valid:
<a href="page.php"class="big">link</a>
<a href="page.php" class="big">link</a>
25,000 HTML checks per month. Is that enough for your site?
Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.