Rocket Validator automatically checks your pages on the W3C Validator.
<option> element no longer accepts a
name attribute, which is now obsolete.
<select id="pet-select"> <option value="">--Please choose an option--</option> <option value="dog">Dog</option> <option value="cat">Cat</option> <option value="hamster">Hamster</option> </select>
Related W3C validator issues
id attribute of an HTML element, used to identify the element when linking, scripting or styling, must be unique in the whole document and must not contain whitespace.
Technically, in HTML5, the value for an id attribute may contain any character, except whitespace characters. However, to avoid inadvertent errors, only ASCII letters, digits,
-should be used and the value for an
idattribute should start with a letter.
<meta> tag has been found that is either malformed, or in a bad place within the document. Check its attributes and context.
For example, the following HTML contains a valid
<meta> tag that is raising an issue because of bad context, caused by an
<img> tag that shouldn’t be there:
<!DOCTYPE html> <html lang=""> <head> <title>Test</title> <img src="photo.jpg" alt="A smiling cat" /> <meta name="description" content="Description of this page" /> </head> <body> <p>Some content</p> </body> </html>
If we fix that document and move the
<img> tag within the body, the issue raised about
<meta> disappears because it’s now in a valid context:
<!DOCTYPE html> <html lang=""> <head> <title>Test</title> <meta name="description" content="Description of this page" /> </head> <body> <p>Some content</p> <img src="photo.jpg" alt="A smiling cat" /> </body> </html>
id attribute is used to identify a single element within a document, it’s not required, but if used it must be unique, and must not be an empty string.
IDs for HTML elements can’t be blank.
<label> element represents a caption in a document, and it can be associated with a form input using the
for attribute, which must be an ID. Document IDs cannot contain whitespace.
<form> <label for="user_name">Name</label> <input type="text" id="user_name" /> </form>
<pattern> element has been found with an invalid ID. Check the format of the ID and ensure it does not start with a digit, full stop (.) or hyphen (-).
<pattern> element is used within
<svg> elements, which use XML 1.0 syntax. That syntax specifies that valid IDs only include designated characters (letters, digits, and a few punctuation marks), and do not start with a digit, a full stop (.) character, or a hyphen-minus (-) character.
id attribute is used to identify a single element within a document, and is required to be unique. Check the document for repeated IDs.
Drop-down lists can be defined in HTML by using the
<select> tag, containing the different
<option> must have a name, which can be either contained between
</option>, or alternatively using the
<select name="size"> <option value="s">small</option> <option value="m" label="medium"></option> </select>
Rocket Validator checks HTML on your sites using the latest version of W3C Validator Nu HTML Checker, which is intended for HTML5 documents.
The page scanned is using an obsolete doctype, instead of the expected
<big> tag is now obsolete. It was used to increase the size of text, you can do that using CSS instead. For example:
<p>Now this is <span style="font-size: larger;">big</span></p>
<script> element has been found that is using the now obsolete
charset attribute. You can safely remove this attribute.
For example, this is using both
charset attributes, with their default values. Both can be removed:
and just use this:
<select> elements that are
required and are not
multiple need a placeholder option that has no
value, for example:
<select required> <option value="">choose size</option> <option value="s">small</option> <option value="l">large</option> </select>
Element IDs in an HTML document must be unique. The HTML validator is indicating the first occurrence of an ID that is repeated. Check the details for that issue to see web pages affected, and the elements within them, to fix that ID repetition.
<font> element, used to define the font face, size and color in previous versions of HTML, is no longer valid in HTML5. Instead, you should rely on CSS styles.
For example, you can define a font size of 12px, bold text with inline styles like this:
<p style="font-size: 12px; font-weight: bold;">some text</p>
Learn more about CSS fonts:
<script> tag allows authors to include dynamic scripts and data blocks in their documents. This tag accepts two optional attributes,
src to indicate the URL of the external script to use.
language attribute is now obsolete and should not be used.
Read more about:
In the days before HTML5, named anchors were used as a way to provide a link to a specific section of a document, for example:
<h2> <a name="section-5">Section 5</a> </h2>
Now in HTML5, the
name attribute is obsolete for
<a> tags, and instead, you can use the
id attribute of any element (not just
<a>) as a way to navigate directly to it, for example:
<h2 id="section-5">Section 5</h2>
Read more about:
<meta> element no longer accepts a
scheme attribute, it’s now obsolete and should be removed.
For example, old documents adhering to old definitions in DCMI (Dublin Core Metadata Initiative) use this HTML tag to define a date:
<meta name="DC.Date.Created" scheme="W3CDTF" content="2009-11-30" />
scheme attribute is now obsolete, it should now be removed. The following HTML code will pass current validations, but you should check the exact definition to use if you want to keep using the DCMI tags.
<meta name="DC.Date.Created" content="2009-11-30" />
<tt> tag, used in HTML4 to apply a monospaced (fixed width) font to the text, was deprecated in HTML5. Instead, you should use CSS to apply the desired font.
Example, instead of this deprecated code:
<tt>This is deprecated</tt>
You can define a monospaced text using
<span style="font-family: monospace;">This is monospaced text</span>
<label> tags are used to label inputs in form, which need to be present and visible in the document, for example:
<label for="age">Age</label> <input id="age" />
In HTML5, there’s no need to specify the
version attribute - it is now obsolete. Here’s an example minimal HTML document to start with:
<!DOCTYPE html> <html lang="en"> <head> <title>Test</title> </head> <body> <p></p> </body> </html>
When was the last time you validated your whole site?
Keep your sites healthy checking for A11Y/HTML issues on an automated schedule.