HTML Checking for Large Sites
Rocket Validator integrates the W3C Validator HTML checker into an automated web crawler.
The “align” attribute on the “td” element is obsolete. Use CSS instead.
td style="text-align:center;">contenttd>
Related W3C validator issues
elements no longer accept a valign attribute. This can be achieved using CSS like this:
td style="vertical-align:middle;">contenttd>
Both and 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;">Nametd> tr> table>
A table row was X columns wide, which is less than the column count established by the first row (Y).
A contains a row that has less columns than the column count established by the first row. Check the table to ensure all rows have the same number of columns.
For example, in the following table, the first row defines that it’s 2 columns wide, but the second row tries to use only 1 column:
table> tr> td>Firsttd> td>Secondtd> tr> tr> td>Wrongtd> tr> table>
The element does not accept a height attribute. Use CSS instead.
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.
Bad value X for attribute “media” on element “link”: Deprecated media feature “max-device-width”. For guidance, see the Deprecated Media Features section in the current Media Queries specification.
To query for the size of the viewport (or the page box on page media), the width, height and aspect-ratio media features should be used, rather than device-width, device-height and device-aspect-ratio, which refer to the physical size of the device regardless of how much space is available for the document being laid out. The device-* media features are also sometimes used as a proxy to detect mobile devices. Instead, authors should use media features that better represent the aspect of the device that they are attempting to style against.
The width media feature describes the width of the targeted display area of the output device. For continuous media, this is the width of the viewport including the size of a rendered scroll bar (if any).
In the following example, this media query expresses that the style sheet is only linked if the width of the viewport 768px maximum:
link rel="stylesheet" media="only screen and (max-width: 768px)" href="styles.css">
Bad value X for attribute “media” on element “link”: Deprecated media feature “min-device-width”. For guidance, see the Deprecated Media Features section in the current Media Queries specification.
To query for the size of the viewport (or the page box on page media), the width, height and aspect-ratio media features should be used, rather than device-width, device-height and device-aspect-ratio, which refer to the physical size of the device regardless of how much space is available for the document being laid out. The device-* media features are also sometimes used as a proxy to detect mobile devices. Instead, authors should use media features that better represent the aspect of the device that they are attempting to style against.
The width media feature describes the width of the targeted display area of the output device. For continuous media, this is the width of the viewport including the size of a rendered scroll bar (if any).
In the following example, this media query expresses that the style sheet is only linked if the width of the viewport is greater than 768px:
link rel="stylesheet" media="only screen and (min-width: 768px)" href="styles.css">
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.
Align attribute on the paragraph element is obsolete
With HTML 4, you can horizontally center an image in a paragraph using
. E.g., the image in the following paragraph would be cenered on the web page:
However, with HTML5, use of the align parameter for horizontally aligning a paragraph on a web page has been deprecated. E.g., if you check your HTML code for adherence to the HTML 5 standard with the Nu Html Checker provided by the World Wide Web Consortium, you will see an error similar to the following one displayed if you are using align with the p (paragraph) tag.
Error The align attribute on the p element is obsolete. Use CSS instead.
From line 73, column 1; to line 73, column 18
tent —>↩↩
↩
The image can be centered within the paragraph, but with the code being HTML 5 compliant using a Cascading Style Sheets method instead by using a style that includes display: block; and margin: auto; with the image tag. E.g., the picture in the above example could be centered within the paragraph and the page using the code below:
Or I could include the following style section in the HEAD section of the HTML code for the webpage, if I wanted to apply that style to certain images on the page.
I could then apply that class to any img tag in a page where I wanted images within a paragraph to be centered within the paragraph.
Created: Sunday September 18, 2016
Last modified: Sunday September 18, 2016 10:10 PM