Forum Moderators: mack
I have been trying to find on the web a list of which elements are allowed (& obviously which are not) in the Strict HTML 4.01 DTD. I looked at the DTD itself and although with some work I could maybe parse it out - it is confusing for a beginner.
I found this chart at W3 -
[w3.org...]
which I thought would help - but it tells more of what is allowed in Loose, Frameset, etc., then Strict.
I know after looking at the DTD, that for example, EM is allowed in strict which is confusing to me because to me that is a presentation element. This made me want to look at a specific list of what is and what is not allowed. Where can I find this?
Thank you very much.
Debb
HTML 4.01 Strict [dulug.duke.edu]
It is composed of 77 elements, 301 entities, and no notations.
There are a few DTD parsing tools out there that you can use to extract information from the various DTDs. There is one linked to from the site above (at bottom lower right).
I know after looking at the DTD, that for example, EM is allowed in strict which is confusing to me because to me that is a presentation element.
It's not really a presentation element because it's just says emphasis, it doesn't define how that emphasis should be presented. (as compared to <b> or <i> for instance).
Likewise <strong> is also allowed.
It's not really a presentation element because it's just says emphasis, it doesn't define how that emphasis should be presented. (as compared to <b> or <i> for instance).
I "think" I see the point - with <b> and <i> the designer is specifically defining how it should look, vs. using <em> where the broswer is the agent deciding how it will display (and to boot, different browsers will EMphaisze it differently).
That is why I guess, H1-H6 are allowed in strict - these also are elements where the browser sets how it will look, fontsize-wise.
Is this correct?
Thanks
Basically a tag like <h1> says: "this is the most important heading on the page". And a tag like <em> says: "this is emphasised text". But neither tag says what the most important heading or emphasised text should look like... they just describe the role of the element within the structure of the document.
The presentation of those elements is left to the default stylesheet of the browser if no other stylesheet is specified.
By contrast <i> says: "this text is italic" which is presentational information. Stylesheets were introduced, essentially, so that presentational information could be separated from structural information.
"{TT, I, B, BIG, SMALL, STRIKE, S, and U} elements specify font information. Although they are not all deprecated, their use is discouraged in favor of style sheets."
- [w3.org...]
In my opinion they should have been deprecated and they have no place in a Strict document. I'm not sure why they decided not to.