what's wrong?

Discussion in 'HTML' started by thedarkman, Jan 7, 2007.

  1. thedarkman

    thedarkman Guest

    thedarkman, Jan 7, 2007
    #1
    1. Advertising

  2. thedarkman

    John Hosking Guest

    thedarkman wrote:
    > http://www.ismichaelstoneguilty.org/m_s_stone_letter_october_20_2006.html
    >
    > the above page should exhibit the four options on consecutive lines but
    > for some reason on the website two of the lines are merged as you can
    > see. There doesn't appear to be any error in the coding. Can anyone
    > sort this out?
    >


    Well, you can *say* there doesn't appear to be any error, but it doesn't
    make it true. It doesn't even validate
    http://validator.w3.org/check?verbo...lty.org/m_s_stone_letter_october_20_2006.html
    (or try http://tinyurl.com/yxdgsq), and that doesn't necessarily detect
    any logic errors. It's just the *syntax*. But the code, my friend, is awful.

    As it happens you've got something like this:
    <h3><br>
    <p><a href="blah1.html">To First Letter
    <br><a href="blah2.html">To Second Letter</br>
    <br><a href="blah3.html">Return To Correspondence Index</br>
    <br><a href="blah4.html">Return To Site Index
    </h3>

    This is a very long <h3> element (although it's not really a heading,
    it's a list of four links). The first element in the <h3> is a
    line-break. Then you've got a paragraph (for some non-reason) which
    looks like it's going to contain a link. The <a> element is started
    (blah1), but never finished. After the text "To First Letter" there
    comes a <br>, which really is a line-break.

    Then a second link (blah2) starts (again without closing tag) with the
    text "To Second Letter". Next comes a thing spelled </br>, which isn't
    really anything, but appears to be treated by some browsers as a
    line-break. Then there follows a <br>, which really is a line-break. So
    that's two line-breaks following the second link.

    Similar chaos ensues after the third (likewise unclosed) <a> link,
    before finishing the train wreck with (1) the lack of a terminating </a>
    for the fourth link; (2) the lack of a </p> (not formally required).

    Additionally, the page starts with two never-terminated <font> elements
    and a spurious closing </center> tag.

    You're lucky a browser shows you *anything*.

    HTH
    --
    John
     
    John Hosking, Jan 7, 2007
    #2
    1. Advertising

  3. thedarkman wrote:

    > http://www.ismichaelstoneguilty.org/m_s_stone_letter_october_20_2006.html
    >
    > the above page should exhibit the four options on consecutive lines
    > but for some reason on the website two of the lines are merged as you
    > can see. There doesn't appear to be any error in the coding. Can
    > anyone sort this out?


    Count your <br>'s. And </br> is incorrect; line breaks don't use
    closing tags.

    You should use a list, instead of putting them in a heading element
    <h3>. <hx> elements are headings, not size controls. Also lacking the
    closing </a> tags, which some browsers may fail on. Use:

    <ul>
    <li><a href="m_s_letter_governor_october_16_2006.html">To First
    Letter</a></li>
    <li><a href="m_s_letter_to_governor_october_30_2006.html">To Second
    Letter</a></li>
    <li><a href="m_s_letters.html">Return To Correspondence Index</a></li>
    <li><a href="m_s_ismichaelstoneguilty_site_index.html">Return To Site
    Index</a></li>
    </ul>

    If you really want them bold, add this in your <head> section:

    <style type="text/css">
    li { font-weight: bold; }
    </style>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jan 7, 2007
    #3
  4. thedarkman

    dorayme Guest

    In article
    <>,
    "thedarkman" <> wrote:

    > http://www.ismichaelstoneguilty.org/m_s_stone_letter_october_20_2006.html
    >
    > the above page should exhibit the four options on consecutive lines but
    > for some reason on the website two of the lines are merged as you can
    > see. There doesn't appear to be any error in the coding. Can anyone
    > sort this out?


    Nearly everything is wrong. You can get info from trying to
    validate the page... but really, you need to get a tute on how to
    write HTML and CSS. It is so simple what you need that if no one
    has helped you by maybe tomorrow, I will suggest a plan if your
    voice is heard again... But swim time now for dorayme... bleak as
    the day is...

    --
    dorayme
     
    dorayme, Jan 7, 2007
    #4
  5. dorayme wrote:

    > but really, you need to get a tute ...


    Oft recommended: http://htmldog.com/

    Enjoy your swim. ;-)

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jan 7, 2007
    #5
  6. thedarkman

    dorayme Guest

    In article
    <Li_nh.342429$>,
    "Beauregard T. Shagnasty" <> wrote:

    > dorayme wrote:
    >
    > > but really, you need to get a tute ...

    >
    > Oft recommended: http://htmldog.com/
    >
    > Enjoy your swim. ;-)


    I did. And am in such a good mood now that I offer OP:

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

    <html>
    <head>
    <title>Is Michael Stone guilty? Website - Letter from the
    governor of HMP Full Sutton</title>

    <style type="text/css">
    h1 {color: #C00; background: #fff;text-align: center;}
    li { font-weight: bold; margin-bottom: .3em;}
    div {text-align: center}
    div img {width: 919px; height: 1260px}
    </style>

    </head>
    <body>

    <h1>Letter From The Governor Of HMP Full Sutton</h1>

    <ul>
    <li><a href="m_s_letter_governor_october_16_2006.html">To First
    Letter</a></li>
    <li><a href="m_s_letter_to_governor_october_30_2006.html">To
    Second
    Letter</a></li>
    <li><a href="m_s_letters.html">Return To Correspondence
    Index</a></li>
    <li><a href="m_s_ismichaelstoneguilty_site_index.html">Return To
    Site
    Index</a></li>
    </ul>

    <div>
    <img
    src="http://www.ismichaelstoneguilty.org/m_s_stone_governor_letter
    _october_20_2006_page_1.jpg" alt="LETTER FROM THE GOVERNOR OF HMP
    FULL SUTTON - PAGE 1">

    <img
    src="http://www.ismichaelstoneguilty.org/m_s_stone_governor_letter
    _october_20_2006_page_2.jpg" alt="LETTER FROM THE GOVERNOR OF HMP
    FULL SUTTON - PAGE 2">
    </div>

    </body>
    </html>

    No need for even a break or div to separate imgs, if anyone had a
    monitor big enough, pages side by side would be fine. As it
    happens they are same size, from the scanned page. Terrible
    scanner or something! And far far too big in file size... er...no
    I am not in that good a mood... personally, I would not bother to
    centre anything in this thing, but earthlings seem to love it,
    there are genes that code for the programming bias in their
    brains you see...

    --
    dorayme
     
    dorayme, Jan 7, 2007
    #6
  7. thedarkman

    dorayme Guest

    In article
    <>,
    dorayme <> wrote:

    > div img {width: 919px; height: 1260px}


    Perhaps, come to think of it, to give a bit more sense of order,

    div img {width: 919px; height: 1260px; border:3px solid #666;}

    --
    dorayme
     
    dorayme, Jan 7, 2007
    #7
  8. dorayme wrote:

    > "Beauregard T. Shagnasty" <> wrote:
    >
    >> dorayme wrote:
    >>
    >>> but really, you need to get a tute ...

    >>
    >> Oft recommended: http://htmldog.com/
    >>
    >> Enjoy your swim. ;-)

    >
    > I did. And am in such a good mood now that I offer OP:


    Well done. Amazing what a dip will do for you. <g>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jan 7, 2007
    #8
  9. thedarkman

    thedarkman Guest

    Thanks everyone; I'm not interested in using lists or stylesheets or
    anything like that. My code is very basic. Like me! Will check it out
    on another machine later today.

    Beauregard T. Shagnasty wrote:
    > dorayme wrote:
    >
    > > "Beauregard T. Shagnasty" <> wrote:
    > >
    > >> dorayme wrote:
    > >>
    > >>> but really, you need to get a tute ...
    > >>
    > >> Oft recommended: http://htmldog.com/
    > >>
    > >> Enjoy your swim. ;-)

    > >
    > > I did. And am in such a good mood now that I offer OP:

    >
    > Well done. Amazing what a dip will do for you. <g>
    >
    > --
    > -bts
    > -Motorcycles defy gravity; cars just suck
     
    thedarkman, Jan 7, 2007
    #9
  10. thedarkman wrote:

    > Thanks everyone; I'm not interested in using lists or stylesheets or
    > anything like that. My code is very basic.


    ...and - pardon me for reiterating - very full of errors. So 1997, too.
    Why would you not want to try to improve? I figured your original post
    here was to learn how to correct the mistakes you had made. Proper,
    modern code is really quite simple.

    > Like me! Will check it out on another machine later today.


    Copy dorayme's code, give it a different file name for testing. You
    don't need another machine.

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jan 7, 2007
    #10
  11. thedarkman

    Toby Inkster Guest

    Beauregard T. Shagnasty wrote:

    > Count your <br>'s. And </br> is incorrect; line breaks don't use
    > closing tags.


    Except in XHTML :)

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 7, 2007
    #11
  12. Toby Inkster wrote:

    > Beauregard T. Shagnasty wrote:
    >
    >> Count your <br>'s. And </br> is incorrect; line breaks don't use
    >> closing tags.

    >
    > Except in XHTML :)


    I thought it was <br /> in XHTML. Though Jukka says <br></br> is
    allowed in XML.
    http://www.cs.tut.fi/~jkorpela/html/empty.html

    The OP isn't using it this way, however, having back-to-back </br><br>
    in his page.

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jan 7, 2007
    #12
  13. thedarkman

    Andy Dingley Guest

    Toby Inkster wrote:
    > Beauregard T. Shagnasty wrote:
    >
    > > Count your <br>'s. And </br> is incorrect; line breaks don't use
    > > closing tags.

    >
    > Except in XHTML :)


    Not even then. An empty tag isn't a closing tag.

    <br> is defined as an empty element in both HTML and XHTML. So although
    an XHTML parser should accept <br></br>, there's no reason at all why
    one should ever be generated in this form.
     
    Andy Dingley, Jan 7, 2007
    #13
  14. thedarkman

    Toby Inkster Guest

    Andy Dingley wrote:

    > Not even then. An empty tag isn't a closing tag.


    <br/> isn't a closing tag. </br> is though.

    > <br> is defined as an empty element in both HTML and XHTML. So although
    > an XHTML parser should accept <br></br>


    A conforming XHTML parser not only *should* accept <br></br>, but *must*.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 7, 2007
    #14
  15. thedarkman

    Andy Dingley Guest

    Toby Inkster wrote:

    > Andy Dingley wrote:
    >
    > > Not even then. An empty tag isn't a closing tag.

    >
    > <br/> isn't a closing tag. </br> is though.


    Of course, but it was your post that mentioned </br> !

    > A conforming XHTML parser not only *should* accept <br></br>, but *must*.


    That's still a little vague. An "XHTML in XML" parser must accept it,
    but what about an "XHTML under Appendix C" parser? And the main point
    still stands, although acceptance of <br></br> in XHTML is good
    (whether this is actually strongly required or mandatory) _generating_
    <br></br> is never a requirement.
     
    Andy Dingley, Jan 8, 2007
    #15
  16. thedarkman

    John Hosking Guest

    Andy Dingley wrote:
    > Toby Inkster wrote:
    >
    >>Andy Dingley wrote:
    >>
    >>
    >>>Not even then. An empty tag isn't a closing tag.

    >>
    >><br/> isn't a closing tag. </br> is though.

    >
    >
    > Of course, but it was your post that mentioned </br> !
    >


    Well, only to the extent that Toby and Beauregard are the same person. ;-)

    Come to think of it, I *have* wondered why I never see them together...

    --
    John (packing binoculars for a quick trip to stately Wayne Manor...)
     
    John Hosking, Jan 8, 2007
    #16
  17. thedarkman

    Toby Inkster Guest

    Andy Dingley wrote:

    > Of course, but it was your post that mentioned </br> !


    No it wasn't.

    > That's still a little vague. An "XHTML in XML" parser must accept it,
    > but what about an "XHTML under Appendix C" parser?


    Appendix C isn't normative. It outlines guidelines for *producing* XHTML
    so that it is acceptable to many older (non-XHTML) user agents. It does
    not attempt to specify how a conforming XHTML parsing engine should treat
    conforming XHTML.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 8, 2007
    #17
    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. Salisha Khan
    Replies:
    1
    Views:
    11,706
    JohnFol
    Aug 1, 2003
  2. Replies:
    2
    Views:
    404
  3. Pial
    Replies:
    4
    Views:
    57,077
    Phatman
    Aug 27, 2010
  4. Paul Leventis

    Re: Quartus bug or wrong VHDL?

    Paul Leventis, Jun 24, 2003, in forum: VHDL
    Replies:
    0
    Views:
    2,517
    Paul Leventis
    Jun 24, 2003
  5. Matthew
    Replies:
    7
    Views:
    878
    Priscilla Walmsley
    Jan 7, 2005
Loading...

Share This Page