Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 27th, 2004, 06:12 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default doctype 4.01

for HTML 4.01 pages we write
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

this is ok for all popular browsers except MSIE
for Internet Explorer, i've to truncate http://~ portion, otherwise page distorts.

what is correct?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
or previous?

__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old December 27th, 2004, 02:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

anshul, if you don't post your truncated version, we can't know if it's correct or not. Why this need for us to guess all the time?

Anyway, I *guess* that you have stumbled on Quirks contra Standards Rendering Mode.
http://www.hut.fi/u/hsivonen/doctype.html

Maybe what's not correct is your HTML/CSS. But that would be another guess. Hmmmm.


(o<
//\ =^..^=
 
Old December 28th, 2004, 06:12 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

As I read that url, I (did.) used a dtd url in 4.01 transitional doctype:
Quote:
quote:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
As I wrote, this makes html Web page bad in IE5 plus IE6 ( Why? ). If I truncate url pointing2dtd, i.e., 'http://www.w3.org/TR/html4/loose.dtd' from doctype, page looks fine. Transitional documents having <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ( no dtd url ) are validated OK by W3C html 4.01 validator and most people not use dtd url in doctype. I wanted to do that (atleast for transitional html), but IE (only) forbids me do that. Still, skipping dtd url for html 4.01 transitional documents, makes less sense.
Quote:
quote:http://www.oreillynet.com/pub/a/network/2000/04/14/doctype/index.html?page=2
 
Old December 28th, 2004, 06:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Probably because something you have in that page happens to render OK when IE is in Quirks Mode but not when it is in Standards Mode.

Another option is that you have stumbled on one of IE6's many bugs. Some of them go away when you force IE to emulate IE5.

If you show the page someone will probably be able to tell you exactly what and why. Without that we can keep guessing till doomsday.

(o<
//\ =^..^=





Similar Threads
Thread Thread Starter Forum Replies Last Post
Include DOCTYPE declaration Pankaj C XSLT 6 October 18th, 2007 08:46 AM
Copying DOCTYPE madanshah16 XSLT 1 August 18th, 2007 12:23 PM
Form doesn't w3c validate, html 4.01 mps2006 HTML Code Clinic 1 November 26th, 2006 03:41 AM
DOCTYPE for XHTML 1.1 complaince crmpicco HTML Code Clinic 14 July 22nd, 2006 09:24 AM
Why to use <!Doctype...? rupen HTML Code Clinic 2 October 25th, 2005 04:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.