Here what the HTML 4.01 loose DTD (http://www.w3.org/TR/html4/loose.dtd) says about anchors (or at least part of it):
<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
The first bit: <!ELEMENT is the begin of an element declaration.
The second bit: A is the element name.
The bit in brackets is the interesting part, its telling us what this
element is allowed to contain. In this case its saying it can contain
anything in the inline entity definition. So what is in this group? To find
out you have to look at bit higher:
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; |
%formctrl;">
This means that inline is made up of #PCDATA (which means plain text),
anything in the fontstyle entity definition, the %phrase definition and so
on. To find out what's in the special entity definition you have to look
further up in the doc for:
<!ENTITY % special
"A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">
You get the general idea... Special means exactly one of <a> or <img> or
<applet> or <object> or any of the others listed.
Going back to the element definition for the <a> element you'll see the next
thing after the brackets is an asterisk (*), this means that you can have 0
or more inline elements within an <a>.
The next bit is "-(A)" this is saying you can NOT have an <a> nested inside
and <a>.
The last bit is a comment & the end of the definition.
Wait there's a bit I missed.... The - - immediately after the <!ELEMENT A -
what do these mean... Off the top of my head I forget, but I know they have
something to do with whether a closing tag is required.
There's other stuff like ATTLISTs, but you get the general idea. More info
at:
http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#h-3.3
http://www.ldodds.com/delta/dtd_guide.html
http://archive.devx.com/projectcool/developer/xmlz/xmldtd/reading.html#paren
t-child
Cheers
Mark
------------------
Mark Stanton
Technical Director
Gruden Pty Ltd
Tel: 9956 6388
Mob: 0410 458 201
Fax: 9956 8433
http://www.gruden.com
smime.p7s
Description: S/MIME cryptographic signature
