summaryrefslogtreecommitdiffstats
path: root/htdocs/docs/help.html
blob: a9174635682c6f93cec1d55b0f74c3e560c67b4e (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <title>W3C HTML Validation Service Help</title>
    <link rev="made" href="mailto:gerald@w3.org" />
    <link rel="stylesheet" type="text/css" href="/base.css" />
    <meta name="keywords" content="HTML, Hypertext Markup Language, Validation,
      W3C HTML Validation Service" />
    <meta name="description" content="W3C's easy-to-use HTML validation
      service, based on an SGML parser." />
    <meta name="revision" content="$Id: help.html,v 1.2 2001-03-26 06:56:52 gerald Exp $" />
    <meta name="modified" content="$Date: 2001-03-26 06:56:52 $" />
  </head>

  <body bgcolor="#FFFFFF" text="#000000" link="#0000ee" vlink="#551a8b">
    <h1><a href="http://www.w3.org/"><img align="left"
       src="http://www.w3.org/Icons/WWW/w3c_home" height="48" border="0"
       alt="W3C" /></a> HTML Validator Help</h1>

    <p align="right" class="navbar">
      <a href="../">Validator home</a> |
      <a href="../about.html">About this service</a> |
      <a href="../feedback.html">Feedback</a><br clear="all" />
    </p>

    <div>
      <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>

    <hr />
    <address>
      <a href="http://validator.w3.org/check/referer"><img
	 src="http://validator.w3.org/images/vxhtml10" height="31" width="88"
	 align="right" border="0" alt="Valid XHTML 1.0!" /></a>
      <a href="/feedback.html">Webmaster</a><br />
	 $Date: 2001-03-26 06:56:52 $
    </address>

  </body>
</html>