Rocket Validator integrates the W3C Validator HTML checker into an automated web crawler.
<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:
Related W3C validator issues
<script> tag allows authors to include dynamic scripts and data blocks in their documents. When the
src is present, this tag accepts a
type attribute which must be either:
- an empty string
type for an
script element is not a valid MIME type as it’s missing a subtype.
A MIME type most-commonly consists of just two parts: a type and a subtype, separated by a slash (/) — with no whitespace between, for example:
defer boolean attributes of the
<script> element control how an external script should be executed once it has been downloaded. The
async attribute makes sense when an external script (defined with the
src attribute) is loaded, or when defining a script of type
25,000 HTML checks per month. Fully automated.
Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.
charset attribute on a
<script> element can be used to specify the character encoding of an external script, whose URL should be specified on the
If the script is not external, then the
charset attribute should not be used, as the character encoding of the HTML document will be used.
async boolean attributes of the
<script> element control how an external script should be executed once it has been downloaded. These attributes only make sense when referring to external scripts, so a
src attribute must also be present to specify the location of the script.
<script defer src="app.js"></script>
If your script is not external, and is inlined within the HTML document, then you should remove the
defer attribute, like in this example:
<script> console.log("hello"); </script>
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
<script> start tag has been found in an unexpected place in the document structure. Check that the
<script> section appears within the
Here’s an example of a script inserted in the head of the document:
<!DOCTYPE html> <html> <head> <title>Test</title> <script> console.log("Hello from the head"); </script> </head> <body> <p></p> </body> </html>
50,000 Accessibility and HTML checks per month. Fully automated.
Let our automated scanner check your large sites using Axe Core and W3C Validator.
<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:
<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:
<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>
<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>
<script> tags is
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.