Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- 4.01 strict weirdness
December 29, 2010, 10:58 pm
rate this thread
all that, but I'm getting conflicting info and code checking on it.
For example, I use Quanta 3.5.10 in slackware and have it set for DTD
4.01 strict and use this opening DTD line:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
Fine. Problem is, I have two pages I'm working on. One was cut n'
pasted from htmldog and modded to the above dtd. When checking it
with quanta's Tidy syntax checker, no problem. I have another page I'm
beginning which has the exact same cut n' pasted line in it and I get
an error. The error free page uses <html></html>. When I use the
same element with closing tag in the other page I get:
Warning: discarding unexpected </html>
BTW, this closing tag is auto completed, so I know it's
correct. If I delete the closing html tag in the second error-prone page,
the error goes away. I read on two different 4.01 strict reference
pages that the closing tag has been "depricated" and/or is "optional",
which seems to be confirmed by the second page with no closing tag and
no errors. Why the difference? Jes flacky software?
The only other difference I can see is, the error-free page has a
<body></body> element with a buncha other code and the 2nd error-prone
page has only <head></head> elements in it, as I check as I go and am
jes getting started on it. WTF am I missing?
Re: 4.01 strict weirdness
Oh, or you have an </html> closing tag without any <html> opening tag.
Incidentally, the tag is optional, but *_NOT_* deprecated.
The version attribute of the html tag is deprecated, as this information
is now given in the dtd.
The html element can also contain language and text direction attributes.
eg: <html dir="ltr" lang="en-gb">
- » Flicker when using big background images in non Firefox browser
- — Next thread in » HTML Markup Language