Parlez Vous HTML ?
Most everyone knows that the "L" in HTML stands for Language.
In one sense, computer languages are no different from spoken languages.
Every language (including HTML) has certain known "rules" that
determine what passes for sensible communication.
--
Understanding HTML Validation
stands for "HyperText Markup Language".
It is not a programming language, as one often hears people
mistakenly call it.
"Programming" languages are 'computationally complete' - you can
compute with them; typically they are recognisable by having
branching and looping constructs. HTML does not.
So, HTML is not for expressing algorithms, but for markup.
Again, there is a common misconception to clear up: "markup" refers to
document structure, not presentation. HTML is an application of
SGML,
which is a meta-language for specifying markup languages.
HTML does not need a compiler to translate it into machine code,
such as C does. It's more like an interpreted language
such as Java or Perl;
the browser interprets the markup instructions into an
internal represenation of the document structure, and then maps that
to a display device - typically a computer screen, but possibly
something else, such as audio output for a blind person.
Finally, while we're clearing up the common misconceptions: HTML does
not have "commands". Those angle brackets contain tags
(the first word in them) and attributes (the following bits).
Attributes have values. So for example, in
<a href="http://Stars.com/">The WDVL</a>
This is the A or "anchor" tag; the one attribute used here
(there are others) is href which has the value
http://Stars.com/. It is not a command.
Still, although HTML is not a programming language, it does have a
syntax - i.e. grammatical structure and vocabulary.
You have to use the right words, in a meaningful order, otherwise
nobody (or nobrowser) will understand you.
With natural languages, such as English, syntax is largely determined
by common usage, the OED, the Queen, and the BBC.. (just kidding :*).
There is no task force or consortium charged with specifying just what
"English" is.. English is what's spoken in England. That's it
(tho' the Americans like to call their language "English", but then,
they use "football" to describe a game where the foot rarely touches
the ball).
But computer languages need far more formality. Computers are not yet
very good at figuring out what you really mean. And then, it helps if
everyone adopts one standard specification - so that software
products interoperate and work on all the various platforms.
So - What IS 'HTML Validation' ??
HTML validation is the process of checking an HTML page against
some DTD.
A DTD is a "Document Type Definition" which specifies the syntax
(grammatical structure) of a web page in
SGML,
the Standard Generalised Markup Language
- of which HTML is an application. Well, an
understanding of SGML isn't necessary to validate your pages, the
validation service will point out errors in your HTML in (almost) plain
language and HTML terms. Normally you will want to validate against one
of the standard (or draft standard) DTDs, e.g. for HTML 3.2 or
HTML 4.0 (draft).
Try validating your home page:-
Unless you've done this before, you probably got a ton of
errors..
It usually comes as a shock to most people that their HTML was
so non-standard.
However, don't be put off. Usually the problems are easily solved;
often it's a simple omission such as ALT attributes for the IMG tags,
or missing the quotes around attribute values such as the URLs in
anchors.
One of the commonest is to span character formatting across blocks, e.g.
<b>This is bold.
<p>
This is the next bold paragraph.</b>
Character formatting, whether done with
<b> or
<i> or
<font>,
etc, must be turned off before ending a paragraph
(I know, it's a pain, but that's how it is).
HTML Checkers
Why Validate Your HTML ?
|