Jump to content

W3C Markup Validation Service: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m replaced: pages; however, → pages. However, it; other punct using AWB
(40 intermediate revisions by 34 users not shown)
Line 1: Line 1:
{{short description|Validator service by the World Wide Web Consortium}}
{{Selfref|For validating markup of Wikipedia pages, see [[Help:Markup validation]].}}
{{multiple image | direction = vertical | width = 40%
[[File:Valid XHTML 1.0.svg|thumb|88px|Tag certifying that a website has been checked for well-formed XHTML markup]]
|image1=Valid XHTML 1.0.svg
[[File:Valid CSS.svg|thumb|88px|Tag certifying that a website has been checked for well-formed CSS markup]]
|image2=Valid CSS.svg
|caption2=Tag certifying that a website has been checked for well-formed XHTML (above) and CSS (below) markup}}


The '''Markup Validation Service''' is a [[validator]] by the [[World Wide Web Consortium]] (W3C) that allows [[Internet]] users to check [[HTML]] and [[XHTML]] documents for [[Well-formed element|well-formed]] markup. 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.<ref name="w3.org_about">{{cite web |url=http://validator.w3.org/about.html |title=About the W3C Markup Validation Service |accessdate=2011-05-20 |work=W3C Markup Validation Service |publisher=World Wide Web Consortium }}</ref> Though W3C validation is important for browser compatibility and site usability, it has not been confirmed what effect it has on [[search engine optimization]].
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 element|well-formed]] markup against a [[document type definition]]. 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.<ref name="w3.org_about">{{cite web |url=http://validator.w3.org/about.html |title=About the W3C Markup Validation Service |access-date=2011-05-20 |work=W3C Markup Validation Service |publisher=World Wide Web Consortium }}</ref> 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 [[Document type definition|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.<ref>{{cite web |title=Ready to check - Nu Html Checker |url=https://validator.w3.org/nu/ |website=validator.w3.org}}</ref>


==History==
==History==
The Markup Validation Service began as ''The Kinder, Gentler HTML Validator'', a project by Gerald Oskoboiny.<ref name="w3.org_about">{{cite web |url=http://validator.w3.org/about.html |title=About the W3C Markup Validation Service |accessdate=2008-06-28 |work=W3C Markup Validation Service |publisher=World Wide Web Consortium }}</ref> 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.<ref name="www-html_validator">{{cite mailing list|url=//lists.w3.org/Archives/Public/www-html/1994Jul/0015|title=ANNOUNCE: HaL Interactive HTML Validation Service|date=1994-07-13|accessdate=2008-06-28|mailinglist=www-html|last= Connolly|first=Dan}}</ref>
The Markup Validation Service began as ''The Kinder, Gentler HTML Validator'', a project by Gerald Oskoboiny.<ref name="w3.org_about"/> 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.<ref name="www-html_validator">{{cite mailing list|url=//lists.w3.org/Archives/Public/www-html/1994Jul/0015|title=ANNOUNCE: HaL Interactive HTML Validation Service|date=1994-07-13|access-date=2008-06-28|mailing-list=www-html|last= Connolly|first=Dan}}</ref>


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.<ref name="oskoboiny_kgv">{{cite web |url=http://impressive.net/people/gerald/1996/ugweb/validate/changes.html |title=History of the Kinder, Gentler HTML Validator |accessdate=2008-06-28 |first=Gerald |last=Oskoboiny |date=2003-03-22}}</ref>
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.<ref name="oskoboiny_kgv">{{cite web |url=http://impressive.net/people/gerald/1996/ugweb/validate/changes.html |title=History of the Kinder, Gentler HTML Validator |access-date=2008-06-28 |first=Gerald |last=Oskoboiny |date=2003-03-22}}</ref> In November 2008, the W3C released the validator.nu HTML5 engine and the ability to check documents for conformance to HTML5.<ref>{{Cite web|url=https://validator.w3.org/whatsnew.html|title=What's New at The W3C Markup Validation Service|website=validator.w3.org|access-date=2016-05-31}}</ref>


W3C also offers validation tools for web technologies other than HTML/XHTML, such as [[Cascading Style Sheets|CSS]],<ref name="W3C_CSS" /> [[XML Schema (W3C)|XML schemas]], and [[MathML]].
W3C also offers validation tools for web technologies other than HTML/XHTML, such as [[CSS]], [[XML Schema (W3C)|XML schemas]], and [[MathML]].<ref name="W3C_CSS" />


==Browser accommodation==
==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 [[Document Type Definition|DTD]].
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 [[Document Type Definition|DTD]].


==Limitations==
==Validator criticism==
All mark-up validators suffer from an inability to see the "big picture" on a web page.<ref name="W3C_CSS">{{cite web | title = About the CSS Validator | accessdate=2012-06-24 | publisher=World Wide Web Consortium | url = http://jigsaw.w3.org/css-validator/about.html }}</ref><ref name="Castro">Castro, Elisabeth: ''HTML, XHTML & CSS, Sixth Edition'', page 345-346. Visual Quickstart Guides, Peachpit Press, 2007. ISBN 0-321-43084-0</ref> However, they excel at picking up missed closing tags and other technicalities. This does not mean that the page will display as the author intended in all browsers.
Mark-up validators cannot see the "big picture" on a web page,{{clarify|date=September 2021}} but they excel at picking up missed closing tags and other technicalities.<ref name="W3C_CSS">{{cite web | title = About the CSS Validator | access-date=2012-06-24 | publisher=World Wide Web Consortium | url = http://jigsaw.w3.org/css-validator/about.html }}</ref><ref name="Castro">Castro, Elisabeth: ''HTML, XHTML & CSS, Sixth Edition'', page 345–346. Visual Quickstart Guides, Peachpit Press, 2007. {{ISBN|0-321-43084-0}}</ref>


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 5 (instead of 6) 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.
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, <code>bgcolor="fffff"</code> 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.


Furthermore, even if validated, all web pages should be tested in as many different browsers as possible to ensure that the limitations of the validator are compensated for and that the page works correctly.<ref name="Castro"/>
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.<ref name="Castro"/>


==CSS validation==
==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 is needed to confirm that there are no errors in the associated [[Cascading Style Sheet]]. CSS validators work in a similar manner to HTML and XHTML validators in that they apply current CSS standards to referenced CSS documents.<ref name="Castro"/>
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.<ref name="Castro"/>


==See also==
==See also==
* [[HTML Tidy]], an offline markup validation program developed by [[Dave Raggett]] of [[W3C]]
* [[HTML Tidy]], an offline markup validation program developed by [[Dave Raggett]] of [[W3C]]
* [[CSE HTML Validator]], an offline [[HTML]] and [[CSS]] validator
* [[CSS HTML Validator]], offline [[HTML]] and [[CSS]] validator desktop software
* [[World Wide Web Consortium]] (W3C)
* [[World Wide Web Consortium]] (W3C)


Line 35: Line 39:
==External links==
==External links==
{{Commons category|W3C validation}}
{{Commons category|W3C validation}}
* [http://validator.w3.org/ The W3C Markup Validation Service]
*[https://validator.w3.org/ The W3C Markup Validation Service]
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]
*[https://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]
* [http://codebeautify.org/cssvalidate CSS Validation Tool]


{{W3C Standards}}
{{W3C Standards}}

Revision as of 10:07, 29 May 2024

Tag certifying that a website has been checked for well-formed XHTML (above) and CSS (below) markup

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. 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]

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.[3]

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.[4] In November 2008, the W3C released the validator.nu HTML5 engine and the ability to check documents for conformance to HTML5.[5]

W3C also offers validation tools for web technologies other than HTML/XHTML, such as CSS, XML schemas, and MathML.[6]

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.[6][7]

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.[7]

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.[7]

See also

References

  1. ^ a b "About the W3C Markup Validation Service". W3C Markup Validation Service. World Wide Web Consortium. Retrieved 2011-05-20.
  2. ^ "Ready to check - Nu Html Checker". validator.w3.org.
  3. ^ Connolly, Dan (1994-07-13). "ANNOUNCE: HaL Interactive HTML Validation Service". www-html (Mailing list). Retrieved 2008-06-28.
  4. ^ Oskoboiny, Gerald (2003-03-22). "History of the Kinder, Gentler HTML Validator". Retrieved 2008-06-28.
  5. ^ "What's New at The W3C Markup Validation Service". validator.w3.org. Retrieved 2016-05-31.
  6. ^ a b "About the CSS Validator". World Wide Web Consortium. Retrieved 2012-06-24.
  7. ^ a b c Castro, Elisabeth: HTML, XHTML & CSS, Sixth Edition, page 345–346. Visual Quickstart Guides, Peachpit Press, 2007. ISBN 0-321-43084-0