what's wrong?

J

John Hosking

thedarkman said:
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
 
B

Beauregard T. Shagnasty

thedarkman said:
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>
 
D

dorayme

"thedarkman said:
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...
 
D

dorayme

"Beauregard T. Shagnasty said:
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...
 
D

dorayme

dorayme said:
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;}
 
T

thedarkman

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
 
B

Beauregard T. Shagnasty

thedarkman said:
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.
 
A

Andy Dingley

Toby said:
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.
 
T

Toby Inkster

Andy said:
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>

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

Andy Dingley

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

Of course said:
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.
 
J

John Hosking

Andy said:
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...
 
T

Toby Inkster

Andy said:
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.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top