HTML and CSS Reference
more than inconvenient to identify the numerous—and often identical—closing tags (such as four to five or more
consecutive </div> tags). While finding start tag-end tag pairs is very easy in a file containing 100-200 lines, the task
can be overwhelming for larger files. 1
No matter how experienced a developer is or how sophisticated development tools are used, errors are
inevitable. This is where validators can help the work of web designers. As you will see, validators provide error
locations, along with hints for possible causes and potential solutions.
Since validation contributes to overall web page quality, validators and advanced specific checkers are also
known as web quality assurance tools .
The primary validator for HTML/XHTML documents is the W3C Markup Validation Service at
http://validator.w3.org . In fact, Markup Validation Service v1.3 can be used to validate several types of markup ,
including the following:
• HTML : ISO/IEC 15445:2000 (“ISO HTML”), HTML 2.0, HTML 3.2, HTML 4.01 Frameset, HTML
4.01 Transitional, and HTML5
• MathML : MathML 2.0
• SMIL : SMIL 1.0, SMIL 2.0
• SVG : SVG 1.0, SVG 1.1, SVG 1.1 Basic, SVG 1.1 Tiny
• XHTML : XHTML Basic 1.0, XHTML Basic 1.1, XHTML 1.0 Frameset, XHTML 1.0 Strict,
XHTML 1.0 Transitional, and XHTML 1.1, XHTML Mobile Profile 1.2, XHTML Print 1.0, and
• Mixed-namespace documents : XHTML + RDFa 2 , XHTML 1.1 + MathML 2.0, and XHTML 1.1 +
MathML 2.0 + SVG 1.1
The W3C Markup Validation Service offers three options to validate web documents:
• Validation by direct input : Validation of the markup provided in a textbox. The code can be
either typed directly or copy-pasted from an advanced text editor. This is suitable for testing.
Since there is no physical file to validate, neither character encoding nor server settings can be
checked by direct input.
• Validation by file uploading : Validation of a file uploaded to a temporary folder. Character
encoding can also be checked. Experienced web designers do not use this option frequently
because the file can be uploaded to the host (final destination) with the same effort (in the
case of static files).
• Validation by URI : Validation of an uploaded version on a web server. This is the ultimate
validation that validates markup, character encoding, and server settings. It's ideal for final
checking and the validation of web pages developed by others.
1 Even if there are tools that represent the hierarchy with vertical dotted lines between the opening and closing tag pairs
2 The RDFa notation can be perfectly validated in XHTML documents. As of 2011, the Validator still does not recognize
RDFa in HTML5, however, and gives errors.