Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Doctype screws up file

Reply
Thread Tools

Doctype screws up file

 
 
thedarkman
Guest
Posts: n/a
 
      02-20-2012
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.



 
Reply With Quote
 
 
 
 
Denis McMahon
Guest
Posts: n/a
 
      02-20-2012
On Mon, 20 Feb 2012 10:49:04 -0800, thedarkman wrote:

> 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
 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-20-2012
thedarkman wrote:

> 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.

--
-bts
-This space for rent, but the price is high
 
Reply With Quote
 
Mayeul
Guest
Posts: n/a
 
      02-21-2012
On 20/02/2012 19:49, thedarkman wrote:
> 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.

--
Mayeul
 
Reply With Quote
 
thedarkman
Guest
Posts: n/a
 
      02-21-2012
On Feb 20, 8:02*pm, Denis McMahon <(E-Mail Removed)> wrote:
> On Mon, 20 Feb 2012 10:49:04 -0800, thedarkman wrote:
> > 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

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.
 
Reply With Quote
 
Denis McMahon
Guest
Posts: n/a
 
      02-21-2012
On Tue, 21 Feb 2012 05:08:22 -0800, thedarkman wrote:

> On Feb 20, 8:02*pm, Denis McMahon <(E-Mail Removed)> wrote:
>> On Mon, 20 Feb 2012 10:49:04 -0800, thedarkman wrote:
>> > 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.


> 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
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-21-2012
thedarkman wrote:

> 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>

--
-bts
-This space for rent, but the price is high
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Newbie: Placing DOCTYPE tag on HTML file screws up formatting KS HTML 7 11-10-2004 08:46 AM
WMA file plays in WMP, screws up in Winamp Joel Rubin Computer Support 0 10-17-2004 05:03 PM
6500 rack ear screws? Steve S. Cisco 1 02-13-2004 05:29 AM
OT online screws or is that schools Rick MCSE 4 12-11-2003 01:44 PM



Advertisments