Doctype screws up file

T

thedarkman

Hi guys,

a real anomaly. Check out this file:

http://www.infotextmanuscripts.org/turgel_letters.html

whatever you think of the coding, it views okay. Now, insert this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

at the top, and see what happens.

Also, if you replace any of the quotes with smark quotes, the same
thing happens.

It's not me this time. Can anyone explain? It's obviously something to
do with the <pre> but I can't see why it should behave like this.
 
D

Denis McMahon

a real anomaly. Check out this file:

There is no anomaly. There is simply someone who repeatedly fails to hear
what he is told.

You have been told before why using the wrong doctype is often worse than
using no doctype at all. The problem (and I can say this with absolute
certainty, without looking at the page concerned) is that your code does
not comply with the doctype you are using.

It's as if you're putting a mains power plug on a car radio, and
complaining that it breaks when you try and run it on mains power.

Screwing the wires from a car radio into a mains plug does not make it a
mains radio. Putting the doctype of your choice on a document does not
make it compliant with that doctype.

You would be better off with compliant html and no doctype than you ever
will be with broken html and a doctype that the html is not compliant
with.

Rgds

Denis McMahon
 
B

Beauregard T. Shagnasty

thedarkman said:
a real anomaly. Check out this file:

There is no anomaly. You've been given so much advice you won't follow,
there's no point in giving you more.
http://www.infotextmanuscripts.org/turgel_letters.html

whatever you think of the coding, it views okay.

No it doesn't. It's an MU page. ^1
Now, insert this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

at the top, and see what happens.

Also, if you replace any of the quotes with smark quotes, the same thing
happens.

It's not me this time. Can anyone explain? It's obviously something to
do with the <pre> but I can't see why it should behave like this.

It's still you. Nothing to do with <pre> either.

^1 Maximum-Ugly.
 
M

Mayeul

Hi guys,

a real anomaly. Check out this file:

http://www.infotextmanuscripts.org/turgel_letters.html

whatever you think of the coding, it views okay.Now, insert this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

at the top, and see what happens.

What happens is it switches from quirks mode to standard-compliant mode.

This switch exists, because browsers want to be able to display
standard-compliant websites, while not breaking the websites that were
made before such standard-compliance was established.
In other words, the two modes will not render the same markup in the
same way.

Therefore, switching mode will make your webpage display differently.
As your code is as far from standard-compliant as can be, I expect
switching to standard-compliant mode will do anything but what you intended.
Also, if you replace any of the quotes with smark quotes, the same
thing happens.

Yes. The doctype accepts both and will have the same effect with both.
It's not me this time.

Yes it is. Don't switch to standard-compliant mode if your code is not
standard-compliant.
Can anyone explain? It's obviously something to
do with the<pre> but I can't see why it should behave like this.

It is possible the problem would be less visible without the use of
<pre>, but that would merely be a symptom. The problem is you used
either the wrong code or the wrong doctype policy with your code.

Better not use a doctype at all, or correct your code before using one.
 
T

thedarkman

There is no anomaly. There is simply someone who repeatedly fails to hear
what he is told.

You have been told before why using the wrong doctype is often worse than
using no doctype at all. The problem (and I can say this with absolute
certainty, without looking at the page concerned) is that your code does
not comply with the doctype you are using.

It's as if you're putting a mains power plug on a car radio, and
complaining that it breaks when you try and run it on mains power.

Screwing the wires from a car radio into a mains plug does not make it a
mains radio. Putting the doctype of your choice on a document does not
make it compliant with that doctype.

You would be better off with compliant html and no doctype than you ever
will be with broken html and a doctype that the html is not compliant
with.

Rgds

Denis McMahon
I have used exactly the same code for this file as for the rest of my
websites.




Furthermore, when I view this page as it is on my hard disk, it is
single spaced.


When I view it on the site, it is double spaced.
 
D

Denis McMahon

I have used exactly the same code for this file as for the rest of my
websites.

Every example of your code that you have ever posted or has been seen on
a website link that you posted has been broken.
Furthermore, when I view this page as it is on my hard disk, it is
single spaced.
When I view it on the site, it is double spaced.

Yes, you probably created it on a microsoft platform, are serving it from
a unix-like host, and don't understand and don't have the time or
inclination to find out what that means when you wrap the text with
"<pre>".

You didn't pay any attention last time you were told about this, you
won't pay any attention this time no matter how polite, courteous and
detailed an explanation you get, you'll rant instead about
incompatibility etc etc etc, and then in a few weeks or months you'll be
complaining about the same problem again.

So it would just be a waste of my time and energy trying to explain it to
you. Better people than I have tried in the past and failed.

Rgds

Denis McMahon
 
B

Beauregard T. Shagnasty

thedarkman said:
I have used exactly the same code for this file as for the rest of my
websites.

That should tell you something. The code is as poor as everything else
you've ever written.
Furthermore, when I view this page as it is on my hard disk, it is
single spaced. When I view it on the site, it is double spaced.

It is double-spaced in your code. What else would you expect with <PRE>?

<http://www.w3.org/TR/REC-html40/struct/text.html#edef-PRE>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top