W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: Understanding Tidy

From: Richard A. O'Keefe <ok@atlas.otago.ac.nz>
Date: Mon, 11 Dec 2000 13:33:03 +1300 (NZDT)
Message-Id: <200012110033.NAA32202@atlas.otago.ac.nz>
To: html-tidy@w3.org, kaikow@standards.com
	I find it confusing when Tidy tells me I cannot use (leaving out details):
Roughly speaking, HTML elements fall into two groups.
"Block" and "inline".  <UL> is a block element.  <FONT> is inline.
This has always been a basic fact about HTML.  *All* text style
elements are inline.  So what's confusing?

	Tidy wants to see a </FONT> before the <UL>.
	Is SGML/HTML really that restrictive?

SGML is not.  HTML is.

	If so, I'd like to see the specs for this?

    <!ELEMENT FONT - - (%inline;)*>

This says that the start and end tags of FONT are required,
and that it may only contain the elements listed in %inline, which is

    <!ENTITY % inline "#PCDATA|%fontstyle;|%phrase;|%special;|%formctrl;">

which turns out to mean

Any good book on HTML will make this clear.

	In order to understand Tidy, it would help to learn where is the formal 
	specification on how tags can be nested.
	Is this info in the HTML 4 spec? I cannot seem to find the info.

Yes of course.  The HTML 4 specification not only explains *that* the
definition is in the DTDs, and *where* the DTDs are in the spec, but
*how* to read them.

	Or do I have to look at the SGML Handbook to learn SGML's rules?
It has nothing to do with SGML.	SGML provides the general framework in which
you can define a set of tags and their attributes and containment and ordering
relationships, but does not provide any tags of its own.  FONT is described a
little bit better in the HTML 3.2 spec, because in HTML 4 you're really not
supposed to use it at all.

In HTML 4, you are expected to use cascading style sheets, and you *can*
    <UL STYLE="font: ..."> ... </UL>
using CSS.
Received on Sunday, 10 December 2000 19:33:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:49 UTC