BRZEN
W3C Markup Validation Service
Texto da Wikipédia (en), licença CC BY-SA. O BETARUBI mostra o verbete inteiro nesta página — a leitura não continua fora do site.
The Markup Validation Service is a validator by the World Wide Web Consortium (W3C) that allows Internet users to check pre-HTML5 HTML and XHTML documents for well-formed markup against a document type definition (DTD). Markup validation is an important step towards ensuring the technical quality of web pages. However, it is not a complete measure of web standards conformance.[1] Though W3C validation is important for browser compatibility and site usability, it has not been confirmed what effect it has on search engine optimization.
As HTML5 has removed the use of DTD in favor of a "Living Standard", the traditional Markup Validation Service is not applicable to these formats. Validation is instead performed using an open-source "Nu Validator", an instance of which is provided by W3C.[2]
Criticism
The W3C Markup Validation Service uses or used an SGML parser to parse HTML.[3][4] This procedure is heavily criticized in the WHATWG HTML5 specification:
While the HTML syntax described in this specification bears a close resemblance to SGML and XML, it is a separate language with its own parsing rules. Some earlier versions of HTML (in particular from HTML2 to HTML4) were based on SGML and used SGML parsing rules. However, few (if any) web browsers ever implemented true SGML parsing for HTML documents; the only user agents to strictly handle HTML as an SGML application have historically been validators. The resulting confusion — with validators claiming documents to have one representation while widely deployed web browsers interoperably implemented a different representation — has wasted decades of productivity. This version of HTML thus returns to a non-SGML basis.
Google.com did not validate in the W3C validator in 2009. Matt Cutts, who was head of Google’s webspam team, mocked the W3C validator saying, “And so we’re a little more worried about compatibility with all those different types of browsers than we necessarily are about whether we validate according to the W3C. ... But it’s important to realize that the vast majority of pages on the web don’t validate.”[5]
History
The Markup Validation Service began as The Kinder, Gentler HTML Validator, a project by Gerald Oskoboiny.[1] It was developed to be a more intuitive version of the first online HTML validator written by Dan Connolly and Mark Gaither, which was announced on July 13, 1994.[6]
In September 1997, Oskoboiny began working for the W3C, and on December 18, 1997, the W3C announced its W3C HTML Validator based upon his works.[7] In November 2008, the W3C released the validator.nu HTML5 engine and the ability to check documents for conformance to HTML5.[8]
W3C also offers validation tools for web technologies other than HTML/XHTML, such as CSS, XML schemas, and MathML.[9]
Browser accommodation
Many major web browsers are often tolerant of certain types of error, and may display a document successfully even if it is not syntactically correct. Certain other XML documents can also be validated if they refer to an internal or external DTD.
Limitations
Mark-up validators cannot see the "big picture" on a web page,[clarification needed] but they excel at picking up missed closing tags and other technicalities.[9][10]
DTD-based validators are also limited in their ability to check attribute values according to many specification documents. For example, using an HTML 4.01 DOCTYPE, bgcolor="fffff" is accepted as valid for the "body" element even though the value "fffff" is missing a preceding '#' character and contains only five (instead of six) hexadecimal digits. Also, for the "img" element, width="really wide" is also accepted as valid. DTD-based validators are technically not able to test for these types of attribute value problems.
Pages may not display as intended in all browsers, even in the absence of validation errors and successful display in other browsers. The only way to ensure that pages always display as intended is to test them in all browsers expected to render them correctly.[10]
CSS validation
While the W3C and other HTML and XHTML validators will assess pages coded in those formats, a separate validator like the W3C CSS validator can check that there are no errors in the associated Cascading Style Sheet. CSS validators apply current CSS standards to referenced CSS documents.[10]
See also
- CSS HTML Validator, offline HTML and CSS validator desktop software
- World Wide Web Consortium (W3C)
References
- 1 2 "About the W3C Markup Validation Service". W3C Markup Validation Service. World Wide Web Consortium. Retrieved 2011-05-20.
- ↑ "Ready to check - Nu Html Checker". validator.w3.org.
- ↑ "About the W3C Markup Validation Service". validator.w3.org. Retrieved 2026-08-16.
This service uses: ... A derivative version of James Clark's excellent SGML (and XML) parser SP. The version in use for this service is the "OpenSP" version from the OpenJade team. For some time it also made use of Liam Quinn's modified version, lq-nsgmls.
- ↑ "Introduction To SGML for The W3C Markup Validation Service". validator.w3.org. Retrieved 2026-08-16.
The Validator uses an SGML parser, and a DOCTYPE declaration is the most, if not the only way to know which markup language it should validate documents against. Note that most Web browsers don't actually use an SGML parser, many of them display the documents differently based on the document's DOCTYPE declaration, or lack thereof. This alone is a good reason to always add a DOCTYPE declaration to Web documents. So now you're preparing to add a DOCTYPE to your document. Be sure that the syntax is as described above, and that you use the correct public identifier; otherwise, The Validator will use the wrong DTD, or will be unable to find a DTD at all, and will produce a huge list of absolutely meaningless errors.
- ↑ Cutts, Matt (2009-09-16). Why doesn't google.com validate? by Google Search Central. Retrieved 2026-08-16 – via YouTube.
- ↑ Connolly, Dan (1994-07-13). "ANNOUNCE: HaL Interactive HTML Validation Service". www-html (Mailing list). Retrieved 2008-06-28.
- ↑ Oskoboiny, Gerald (2003-03-22). "History of the Kinder, Gentler HTML Validator". Retrieved 2008-06-28.
- ↑ "What's New at The W3C Markup Validation Service". validator.w3.org. Retrieved 2016-05-31.
- 1 2 "About the CSS Validator". World Wide Web Consortium. Retrieved 2012-06-24.
- 1 2 3 Castro, Elisabeth: HTML, XHTML & CSS, Sixth Edition, page 345–346. Visual Quickstart Guides, Peachpit Press, 2007. ISBN 0-321-43084-0
