Re: minimal HTML

Dave_Raggett ([email protected])
Mon, 10 Jan 94 10:41:25 GMT


Its useful to distinguish several cases:

a) handwritten HTML intended for Web browsers only

b) HTML documents generated by authoring tools

c) document format conversion: to/from other formats

For (a) the minimal style is just about OK as web browsers
can easily infer omitted tags:

<TITLE>blah</TITLE>
<H1>blah</H1>
...

For documents generated by well designed authoring tools,
I would expect the full set of tags to be used.

When you want to use conventional SGML parsers, then you
SHOULD use the full set of tags, including the <!DOCTYPE>
declaration at the start.

Bert writes:

> A comparable situation would have been the result of a set of new tags
> that I once suggested. Consider that an HTML doc be split into
> <SECT1>s, <SECT2>s, etc., corresponding to <H1>, <H2>, etc. This would
> allow an anchor to be attached to a whole section of the text, instead
> of to a header. The <SECTn> tag would be implied by the occurrence of
> <Hn>, in the same manner as <BODY>. (The suggestion was turned down,
> because people wanted to be able to put <Hn> tags inside lists and
> other places where they don't belong.)

In the current HTML+ DTD I use similar techniques to allow browsers to
infer missing <P> elements. Rather than SECTn I use DIVn, but the idea
is exactly the same.

One problem with this approach to allowing the context to imply elements
is that standard SGML parsers are crippled in this regard, and can only
infer an omitted start tag when that tag is the *only* thing permitted
at this point. This explains why you should use the full set of tags
when you intend to process documents with other SGML tools.

Dave Raggett