HTML Checking for Large Sites
Rocket Validator automatically checks your pages on the W3C Validator.
The “type” attribute for the “style” element is not needed and should be omitted.
The HTML <style>
element contains style information for a document, or part of a document, defined in CSS. This element does not need the type
attribute anymore, so it should be omitted.
For example, this style defines that <p>
elements should be in red color.
<style type="text/css">
p {
color: red;
}
</style>
<p>This text will be red.</p>
But, the type
attribute is not used anymore, so we can just use this:
<style>
p {
color: red;
}
</style>
<p>This text will be red.</p>
Read more:
MDN: The Style information element WordPress plugin: Type Attribute Warnings Removal
Related W3C validator issues
The <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
-
text/javascript
(that’s the default, so it can be omitted) -
module
Examples:
<!-- This is valid, without a type it defaults to JavaScript -->
<script src="app.js"></script>
<!-- This is valid, but will warn that it can be omitted -->
<script type="text/javascript" src="app.js"></script>
<!-- An empty attribute is valid, but will warn that it can be omitted -->
<script type="" src="app.js"></script>
<!-- The module keyword is also valid as a type -->
<script type="module" src="app.js"></script>
<!-- Any other type is invalid -->
<script type="wrong" src="app.js"></script>
<script type="text/html" src="app.js"></script>
<script type="image/jpeg" src="app.js"></script>
Learn more:
The <table>
element does not accept a height
attribute. Use CSS instead.
The <textarea>
element does not have a type
attribute.
The HTML <textarea>
element represents a multi-line plain-text editing control, and is useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.
Learn more:
The value rocketlazyloadscript
used in a <script>
tag is not a valid one according to the HTML specification. It is introduced by the WP Rocket Wordpress extension.
Learn more:
The value provided on the type
attribute of an a
element is not a valid MIME type.
The type
attribute expects a MIME type that hints at the linked URL’s format.
Read more:
The type
attribute on <a>
elements, when present, gives a hint on the MIME type of the linked resource, for example:
<a href="application/pdf" src="book.pdf">Read our book</a>
<a href="image/jpeg" src="photo.jpeg">See a photo</a>
That is, we’re talking about the type of the linked resource, not the type of the <a>
element, as it’s sometimes misunderstood. The following example is invalid because button
is not a valid MIME type.
<a href="/order.php" type="button">Submit</a>
Learn more:
The value used to define the type
of a link
is not valid. You’re probably using a URL instead of a valid type.
Example of a valid type
:
<link rel="icon" type="image/png" href="favicon.png">
Read more:
The specified 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:
text/javascript
Learn more:
input
elements can be of different types but zip
is not one of the allowed. Consider using a generic type like text
instead.
A CSS definition for background-image
could not be understood by the parser. Check its definition to ensure that it’s well formed and that it contains an appropriate value.
The value on the display
property is not valid.
The display CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex.
Learn more:
The specified CSS filter is not a standard one, and may only work in some browsers.
Check out the Filter Effects W3C Working Draft
font-display
isn’t a CSS property, it’s a descriptor for use with the @font-face
at-rule.
Learn more:
This issue is a false positive by the W3C validator, fixed in the latest versions of Nu Validator.
The value revert
is indeed a valid value for the CSS property font-size
.
Learn more:
The @import
CSS rule can be used to import a style sheet into another style sheet. It must appear at the top of the document, and after any @charset
declaration.
Learn more:
The max-width
CSS property sets the maximum width of an element. It prevents the used value of the width
property from becoming larger than the value specified by max-width
.
This property can express a value in different units like px
, em
, %
or ch
, and keyword values, but auto
is not an allowed value.
Some examples of valid values for max-width
:
/* <length> value */
max-width: 3.5em;
/* <percentage> value */
max-width: 75%;
/* Keyword values */
max-width: none;
max-width: max-content;
max-width: min-content;
max-width: fit-content(20em);
/* Global values */
max-width: inherit;
max-width: initial;
max-width: revert;
max-width: unset;
Learn more:
An invalid CSS property is being used. Properties starting with mso-
are commonly defined by Microsoft products like Office and Outlook.
These properties, like mso-spacerun
, mso-fareast-font-family
, mso-bidi-font-weight
, mso-margin-bottom-alt
, mso-margin-top-alt
and others starting with mso-
are not standard CSS properties.
Padding properties, unline margin properties, don’t accept negative values. Read more about the CSS box model
CSS styles could not be parsed, check the indicated line to find what caused the parser to fail. Common causes are unclosed curly brackets or comments, missing semicolons or unexpected or empty properties.
Read more about CSS: Cascading Style Sheets syntax
The value break-word
for the property word-break
is deprecated, you should replace it with a valid value.
According to the CSS Text Module Level 3 spec:
For compatibility with legacy content, the word-break property also supports a deprecated
break-word
keyword. When specified, this has the same effect asword-break: normal
andoverflow-wrap: anywhere
, regardless of the actual value of theoverflow-wrap
property.
Learn more:
The value specified for the transform
CSS attribute is not valid.
The transform
CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model.
Learn more:
The ::file-selector-button
has not been recognized by the W3C Validator. This seems to be a bug in the W3C Validator, which has already been reported.
Learn more:
The value specified for a width
attribute in CSS is not valid.
The width CSS property sets an element’s width. There are many allowed values for this attribute, for example:
/* <length> values */
width: 300px;
width: 25em;
/* <percentage> value */
width: 75%;
/* Keyword values */
width: max-content;
width: min-content;
width: fit-content(20em);
width: auto;
/* Global values */
width: inherit;
width: initial;
width: revert;
width: unset;
Learn more:
CSS can’t be properly processed because a computed style is missing a value it depends on.
A CSS definition for an X property could not be understood by the parser. Check it to ensure that it’s well formed and that it contains an appropriate value.
When specifying a numeric value for a CSS property, remember to always include the units, like 3px
or 3em
. Only the 0
value can go without units, and instead of 0px
you can just use 0
.
Learn more:
A <style>
start tag has been found in an unexpected place in the document structure. Check that the <style>
section appears within the <head>
section.
Although in general it’s better to put your styles in external stylesheets and apply them using <link>
elements, CSS styles can also be included inside a document using the <style>
tag. In this case, it should be placed within the <head>
section, like in this example:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<style>
p {
color: #26b72b;
}
</style>
</head>
<body>
<p>This text will be green.</p>
</body>
</html>
Learn more:
<td>
elements no longer accept an align
attribute. This can be achieved using CSS like this:
<td style="text-align:center;">content</td>
The <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>
Read more:
<img>
tags no longer accept a border
attribute. This can be defined using CSS instead, for example:
<img src="..." alt="..." style="border:0;" />
The <center>
tag is no longer valid in HTML, you should use CSS instead, for example:
<p style="text-align:center">this text will be centered</p>
The <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:
The <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 font-family
:
<span style="font-family: monospace;">This is monospaced text</span>
Learn more:
The default type
for <script>
tags is JavaScript
, so you don’t need to include the type for JS resources.
<td>
elements no longer accept a valign
attribute. This can be achieved using CSS like this:
<td style="vertical-align:middle;">content</td>
Both <table>
and <td>
elements no longer accept a width
attribute. Instead, you should use CSS as in this example:
<table style="width:100%;">
<tr>
<td style="width:50px;">Name</td>
</tr>
</table>
You’re using an attribute X that is no longer valid for element Y, but you can use CSS to achieve the same effect.
Still checking your large sites one page at a time?
Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.