Doctype screws up file

Discussion in 'HTML' started by thedarkman, Feb 20, 2012.

  1. thedarkman

    thedarkman Guest

    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.
     
    thedarkman, Feb 20, 2012
    #1
    1. Advertising

  2. 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
     
    Denis McMahon, Feb 20, 2012
    #2
    1. Advertising

  3. 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
     
    Beauregard T. Shagnasty, Feb 20, 2012
    #3
  4. thedarkman

    Mayeul Guest

    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
     
    Mayeul, Feb 21, 2012
    #4
  5. thedarkman

    thedarkman Guest

    On Feb 20, 8:02 pm, Denis McMahon <> 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.
     
    thedarkman, Feb 21, 2012
    #5
  6. On Tue, 21 Feb 2012 05:08:22 -0800, thedarkman wrote:

    > On Feb 20, 8:02 pm, Denis McMahon <> 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
     
    Denis McMahon, Feb 21, 2012
    #6
  7. 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
     
    Beauregard T. Shagnasty, Feb 21, 2012
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Holmes
    Replies:
    2
    Views:
    380
    =?Utf-8?B?UGxpc3Nza2lu?=
    Jul 9, 2004
  2. ik
    Replies:
    6
    Views:
    492
    Shawn B.
    Jul 16, 2004
  3. ik
    Replies:
    8
    Views:
    442
    Mikhail Arkhipov (Microsoft)
    Jul 9, 2004
  4. KS
    Replies:
    7
    Views:
    655
    Michael Winter
    Nov 10, 2004
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,356
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page