summaryrefslogtreecommitdiffstats
path: root/htdocs/docs/help.html
blob: 71e31ec6267849f7652ed488c6db8380e203c872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!--#set var="revision" value="\$Id: help.html,v 1.7 2002-10-23 23:11:30 link Exp $"
--><!--#set var="date" value="\$Date: 2002-10-23 23:11:30 $"
--><!--#set var="title" value="Help for The W3C MarkUp Validation Service"
--><!--#set var="relroot" value="../"
--><!--#include virtual="../header.html" -->

    <div id="skip">
      <h2 id="what-is-it">What does The Validator do?</h2>
        The Validator is sort of like <code>lint</code> for C. It compares
        your HTML document to the defined syntax of HTML and reports any
        discrepancies. 
    </div>
    <div>
      <h2 id="why-validate">Why should I validate my HTML pages?</h2>
      <p>
        One of the important maxims of computer programming is: <q>Be
        conservative in what you produce; be liberal in what you accept.</q>
      </p>
      <p>
        Browsers follow the second half of this maxim by accepting Web pages
        and trying to display them even if they're not legal HTML. Usually
        this means that the browser will try to make educated guesses about
        what you probably meant. The problem is that different browsers (or
        even different versions of the same browser) will make different
        guesses about the same illegal construct; worse, if your HTML is
        <em>really</em> pathological, the browser could get hopelessly
        confused and produce a mangled mess, or even crash.
      </p>
      <p>
        That's why you want to follow the first half of the maxim by making
        sure your pages are legal HTML. The best way to do that is by
        running your documents through one or more HTML validators. 
      </p>
    </div>
    <div><h2 id="others">What other validators are there?</h2><p>FIXME</p></div>
    <div>
      <h2 id="how">How does The Validator work?</h2>
        The Validator is based on <a href="http://www.jclark.com/">James
        Clark</a>'s <code><a href="http://www.jclark.com/sp/">nsgmls</a></code>
        SGML parser. The Validator itself is a CGI script that fetches your
        URL, passes it through <code>nsgmls</code>, and post-processes the
        resulting error list for easier reading. 
    </div>
    <div>
      <h2 id="choosing-dtd">How do I set The Validator to validate in
        HTML2/HTML3/Netscape mode?</h2>
        Unlike WebTechs, The Validator does not allow you to select a document
        type on the fly. If your document is not intended to be HTML
        2.0-compliant, you must add a corresponding <code>DOCTYPE</code>
        declaration to your document; see <a href="sgml.html#doctype">the
        section on <code>DOCTYPE</code></a> for more information. If your
        document does not have a <code>DOCTYPE</code> declaration, The
        Validator will assume an HTML 4.0 document type (and will tell
        you it is doing so).
    </div>
    <div>
      <h2 id="munged-doctype">Help! The Validator spewed a zillion error
            messages on my page!</h2>
        <p>
          Don't panic. Did The Validator complain about your
          <code>DOCTYPE</code> declaration (or lack thereof)? Make sure your
          document has a syntactically correct <code>DOCTYPE</code>
          declaration, as described in the <a href="sgml.html#doctype">section
          on <code>DOCTYPE</code></a>, and make sure it correctly identifies
          the type of HTML you're using. Then run it through The Validator
          again; if you're lucky, you should get a lot fewer errors.
        </p>
        <p>
          If this doesn't help, then you may be experiencing a cascade failure
          &mdash; one error that gets The Validator so confused that it can't
          make sense of the rest of your page. Try correcting the first few
          errors and running your page through The Validator again. 
        </p>
    </div>

<!--#include virtual="../footer.html" -->
  </body>
</html>