Unable to validate some code & IE CSS problem

Discussion in 'HTML' started by Paul F. Johnson, Jan 6, 2004.

  1. Hi,

    The top of the HTML on the webpages at http://www.all-the-johnsons.co.uk
    looks like this

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta name="generator" content="Bluefish">
    <meta name="author" content="Paul">
    <meta name="copyright" content="PFJ 2003">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    <title>www.all-the-johnsons.co.uk - ACCU Mentored Developers GUI
    programme</title>
    <link href="../css/atj.css" rel="stylesheet" type="text/css" />
    <script src="../javascript/netscape.js" language="javascript"
    type="text/javascript">
    </script>
    </head>
    <body>

    When I come to validate this, I get on just about every page the same
    errors that </head> is not allowed as <head> is not open and the <body> is
    not allowed where it is.

    From what I can see though, there is nothing missing, head is open and
    body is straight after the </head>.

    Anyone spot the problem there?

    My second problem is on the stylesheet (which does validate). Under IE 6,
    this causes a problem

    #container { position: relative; width: auto; margin:
    auto; padding: 0; color: #000; background: white
    url("/images/arrow.png") no-repeat scroll -30%30%; text-align: left;}

    If the url("/images/arrow.png") is omitted, everything looks fine and
    dandy, if it's in there, then the pages at
    http://www.all-the-johnsons/accu/index.html (click on the lessons on the
    left) go screwy with their formatting.

    I'm currently re-working these pages as they totally fail to validate, so
    that may be the problem.

    Is it that the open source browsers are more forgiving when it comes to
    style sheet mishaps or have I hit undefined behaviour in HTML?

    TTFN

    Paul

    --
    One OS to fool them all
    One browser to find them
    One email client to bring them all
    And through security holes, blind them...
     
    Paul F. Johnson, Jan 6, 2004
    #1
    1. Advertising

  2. Paul F. Johnson wrote:

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


    Why not Strict?

    > <html>
    > <head>
    > <meta name="generator" content="Bluefish">


    Advert? :)

    > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">


    Suboptimal
    http://www.htmlhelp.com/tools/validator/charset.html

    > <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    > <title>www.all-the-johnsons.co.uk - ACCU Mentored Developers GUI
    > programme</title>
    > <link href="../css/atj.css" rel="stylesheet" type="text/css" />


    The joy of copy/paste.

    While the / is fine (and required) in XHTML, in HTML it is the same as:

    <link href="../css/atj.css" rel="stylesheet" type="text/css">&gt;

    As Character Data is not allowed in the head, and as </head> is optional, it
    is actually the same as:

    <link href="../css/atj.css" rel="stylesheet"
    type="text/css"></head><body>&gt;

    > <script src="../javascript/netscape.js" language="javascript"
    > type="text/javascript">
    > </script>
    > </head>


    So when you get to here, you can't close <head> becuase it is already open.

    > <body>


    And <body> can't be a child element of <body>

    > My second problem is on the stylesheet (which does validate). Under IE 6,
    > this causes a problem
    >
    > #container { position: relative; width: auto; margin:
    > auto; padding: 0; color: #000; background: white
    > url("/images/arrow.png") no-repeat scroll -30%30%; text-align:


    -30%30%? I think you missed a space.

    > left;}


    > Is it that the open source browsers are more forgiving when it comes to
    > style sheet mishaps or have I hit undefined behaviour in HTML?


    Generally, MSIE is the most forgiving browser.

    --
    David Dorward <http://dorward.me.uk/>
     
    David Dorward, Jan 6, 2004
    #2
    1. Advertising

  3. Paul F. Johnson

    DU Guest

    David Dorward wrote:

    > Paul F. Johnson wrote:
    >
    >
    >><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>"http://www.w3.org/TR/html4/loose.dtd">

    >
    >
    > Why not Strict?
    >
    >
    >><html>
    >><head>
    >><meta name="generator" content="Bluefish">

    >
    >
    > Advert? :)
    >
    >
    >><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">

    >
    >
    > Suboptimal
    > http://www.htmlhelp.com/tools/validator/charset.html
    >
    >


    That page does not say much. This page however identifies the
    differences between both character sets:
    http://en.wikipedia.org/wiki/ISO_8859-15

    "ISO/IEC 8859-1 suffers from a number of deficiencies, including the
    omission of a few French diacritics and the lack of a Euro symbol. For
    this reason ISO/IEC 8859-15 has been developed as an update of ISO/IEC
    8859-1 to add the required additional characters. (This required however
    the removal of some less used characters from ISO/IEC 8859-1, including
    fraction symbols and letter-free diacritics: ¤, ¦, ¨, ´, ¸, ¼, ½ and ¾.)"
    http://en.wikipedia.org/wiki/ISO_8859-1

    I'm just a bit curious as to why you say iso-8859-1 is suboptimal.
    Europeans are more likely to need to use iso-8859-15 for their webpages.

    I agree and support entirely the rest of your post.

    DU

    >><meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    >><title>www.all-the-johnsons.co.uk - ACCU Mentored Developers GUI
    >>programme</title>
    >><link href="../css/atj.css" rel="stylesheet" type="text/css" />

    >
    >
    > The joy of copy/paste.
    >
    > While the / is fine (and required) in XHTML, in HTML it is the same as:
    >
    > <link href="../css/atj.css" rel="stylesheet" type="text/css">&gt;
    >
    > As Character Data is not allowed in the head, and as </head> is optional, it
    > is actually the same as:
    >
    > <link href="../css/atj.css" rel="stylesheet"
    > type="text/css"></head><body>&gt;
    >
    >
    >><script src="../javascript/netscape.js" language="javascript"
    >>type="text/javascript">
    >></script>
    >></head>

    >
    >
    > So when you get to here, you can't close <head> becuase it is already open.
    >
    >
    >><body>

    >
    >
    > And <body> can't be a child element of <body>
    >
    >>My second problem is on the stylesheet (which does validate). Under IE 6,
    >>this causes a problem
    >>
    >>#container { position: relative; width: auto; margin:
    >>auto; padding: 0; color: #000; background: white
    >>url("/images/arrow.png") no-repeat scroll -30%30%; text-align:

    >
    >
    > -30%30%? I think you missed a space.
    >
    >
    >>left;}

    >
    >
    >>Is it that the open source browsers are more forgiving when it comes to
    >>style sheet mishaps or have I hit undefined behaviour in HTML?

    >
    >
    > Generally, MSIE is the most forgiving browser.
    >
     
    DU, Jan 6, 2004
    #3
  4. Paul F. Johnson

    Mark Parnell Guest

    On Tue, 06 Jan 2004 17:48:18 -0500, DU declared in alt.html:
    > David Dorward wrote:
    >> Paul F. Johnson wrote:
    >>
    >>><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">

    >>
    >> Suboptimal
    >> http://www.htmlhelp.com/tools/validator/charset.html

    >
    > I'm just a bit curious as to why you say iso-8859-1 is suboptimal.
    > Europeans are more likely to need to use iso-8859-15 for their webpages.
    >


    I believe he was saying that specifying it in the meta tag rather than
    in the http headers was suboptimal, rather than the actual choice of
    encoding. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 6, 2004
    #4
  5. DU wrote:

    >>><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">


    >> Suboptimal
    >> http://www.htmlhelp.com/tools/validator/charset.html


    > I'm just a bit curious as to why you say iso-8859-1 is suboptimal.
    > Europeans are more likely to need to use iso-8859-15 for their webpages.


    I don't - I say using <meta> for this is suboptimal.

    --
    David Dorward <http://dorward.me.uk/>
     
    David Dorward, Jan 6, 2004
    #5
  6. DU <> wrote:

    > This page however identifies the
    > differences between both character sets:
    > http://en.wikipedia.org/wiki/ISO_8859-15
    >
    > "ISO/IEC 8859-1 suffers from a number of deficiencies, including
    > the omission of a few French diacritics and the lack of a Euro
    > symbol. For this reason ISO/IEC 8859-15 has been developed as an
    > update of ISO/IEC 8859-1 to add the required additional characters.


    That's worse than nonsense, in a sense - it has sufficient resemblance
    to truth to mislead people.

    In reality, it's not about "a few French diacritics" (what was added
    for French is the oe _ligature_), and it's _not_ an update of 8859-1,
    just a new member of the ISO 8859 series.

    Moreover, support to ISO-8859-15 in Web browsers is close to
    nonexistent, and there is _no_ need to use it on the Web. (If a page
    using it works, it most probably works because the browser ignores the
    charset declaration and falls back to ISO-8859-1, or more honestly
    to windows-1252.) The few characters that it adds to the ISO-8859-1
    repertoire can easily be handled using character references or entity
    references.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jan 7, 2004
    #6
  7. Mark Parnell wrote:

    > I believe he was saying that specifying it in the meta tag rather than
    > in the http headers was suboptimal, rather than the actual choice of
    > encoding. :)


    Of course, this doesn't have to be an either/or situation.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Jan 7, 2004
    #7
  8. Paul F. Johnson

    Mark Parnell Guest

    On Wed, 07 Jan 2004 07:43:31 +0000, Toby A Inkster declared in alt.html:
    >
    > Of course, this doesn't have to be an either/or situation.


    True. And in this case, it isn't, as Jukka's reply explained. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 7, 2004
    #8
    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. Deryck
    Replies:
    3
    Views:
    631
    SpaceGirl
    Oct 8, 2004
  2. Titus A Ducksass - AKA broken-record
    Replies:
    6
    Views:
    655
    Titus A Ducksass - AKA broken-record
    Nov 15, 2004
  3. Domino
    Replies:
    5
    Views:
    383
    dorayme
    Nov 5, 2006
  4. jollyroger

    Pls help me to validate some code!

    jollyroger, Aug 6, 2007, in forum: HTML
    Replies:
    4
    Views:
    360
    Andy Dingley
    Aug 6, 2007
  5. ginette
    Replies:
    0
    Views:
    144
    ginette
    Jun 4, 2004
Loading...

Share This Page