Questions tagged [w3c-validation]

You can use W3C validation services to check HTML documents, CSS stylesheets, Atom/RSS feeds, and more.

See also the W3C Developer Tools page.

For evaluating conformance with various W3C specs, the W3C provides a number of checkers:

Note: The Markup Validator is an older Perl/CGI/SGML/DTD-based tool that has now effectively been deprecated; use the HTML Checker instead. And the mobileOK Checker is an older tool that is has now been deprecated also; use the Mobile Checker instead.

911 questions
762
votes
8 answers

Are (non-void) self-closing tags valid in HTML5?

The W3C validator (Wikipedia) doesn't like self-closing tags (those that end with “/>”) on non-void elements. (Void elements are those that may not ever contain any content.) Are they still valid in HTML5? Some examples of accepted void…
cdeszaq
  • 30,869
  • 25
  • 117
  • 173
431
votes
18 answers

Is there a valid way to disable autocomplete in a HTML form?

When using the xhtml1-transitional.dtd doctype, collecting a credit card number with the following HTML will flag a warning on the W3C validator: there is no attribute…
matt b
  • 138,234
  • 66
  • 282
  • 345
269
votes
13 answers

Can I use non existing CSS classes?

I have a table where I show/hide a full column by jQuery via a CSS class that doesn't exist: …
totymedli
  • 29,531
  • 22
  • 131
  • 165
197
votes
5 answers

Google fonts URL break HTML5 Validation on w3.org

I load 3 fonts in different sizes using this HTML tag: Till ~1/2 weeks ago this was…
Octavian
  • 4,519
  • 8
  • 28
  • 39
85
votes
4 answers

Best practice for meta data in a html document?

I work on a large scale, high volume, public facing web application. The successful operation of the application is very important to the business, and so there are a number of MI tools that run against it. One of these MI tools essentially looks at…
Nathan Russell
  • 3,428
  • 5
  • 30
  • 51
57
votes
3 answers

How to resolve "No p element in scope but a p end tag seen" error in W3C Validation?

My HTML is as as below. I have opened all elements and closed them. Still when I check it on the W3C's validation service, it shows an error about "No p element in scope but a p end tag seen" I cant figure it out. …
Sam IR
  • 878
  • 1
  • 8
  • 15
50
votes
2 answers

How to write W3C compliant multi-level bullet points in HTML?

Is it possible to write W3C compliant multi-level bullet points (unordered list) in HTML? Nested ul can be used, but is not W3C compliant.
  • myItem 1
  • myItem 2
    • myItem 2a
Techboy
  • 4,286
  • 5
  • 36
  • 45
49
votes
6 answers
in every table?
Is it necessary to have
in every table? According to Standards.
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
44
votes
5 answers

"The frameborder attribute on the iframe element is obsolete. Use CSS instead."

I'm trying to validate my website with the W3C validator but it doesn't work. I have a YouTube iframe and this is the error: The frameborder attribute on the iframe element is obsolete. Use CSS instead. Screenshot: And this is my index.html…
43
votes
3 answers

W3C HTML validation error - Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections

I am getting a warning when I try to validate my page in https://validator.w3.org: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections. My code is as below:
Vidhi
  • 2,026
  • 2
  • 20
  • 31
41
votes
7 answers

Is (not rel="stylesheet") allowed to be used in ?

The new schema.org by Google, Yahoo and MS recommends usage of the attribute to display the status of products in an online shop:
Blend-O-Matic
aufziehvogel
  • 7,167
  • 5
  • 34
  • 56
41
votes
12 answers

Google +1 Button not W3C compliant

So I've been playing with Google's +1 button trying to get it on my website, but it's not W3C compliant. Here's the code: