First you need to understand how validation occurs.
First, there is no html validation. There is SGML validation. SGML is a tool for describing the formal syntax of markup languages. During validation, the document attempts to comply with the DTD, which is a formalized syntax description.
Secondly, the validator just points you to errors and inconsistencies with the formal syntax described. This is necessary in order for the document to be valid - it gives
greater chances that this document will be correctly perceived by most browsers of the present and future generations.
So, validation is
only a tool for catching syntax errors and / or typos. It can help to better understand the syntax. The validator can be fooled - no one forbids you, while staying within the bounds of validity, to write some nonsense in alt or href.
')
Say out loud - "The validator is a tool." Pronounced? Now remember exactly.
Let us turn to degradation.
I will not excel and take
my comment as text:
Elegant degradation does not mean that you can write anything.
This principle means that your page, for example, xhtml2, being read by a previous generation browser (or a device browser that is limited in capabilities), will be displayed quite normally - only without the support of some newer features.
But, if you shove the latest generation browser with something that should be xhtml2 based on the DTD, but it doesn’t represent xhtml2 at all (and indeed no DTD is appropriate), this is not an elegant degradation, but an invalid document.
Therefore, you must use a validator to verify that the document complies with the syntax described in the DTD, as well as remember the elegant degradation, not intended to write a variety of nonsense in the document, but simply to enable less modern customers to display the content of your document.
But it’s unlikely that you will be able to make your website more convenient and accessible by means of validation, however, as well as by writing your DTDs.
Written under the influence of a
heavy synthetic drug