What's wrong with this HTML (fails validation) ?

  • Thread starter robert maas, see http://tinyurl.com/uh3t
  • Start date
C

Chaddy2222

robert said:
Oops, yeah that was a typo.


I tried that for the first time today. It was a horrible failure.
Here's the loose Web page that I want to convert:
<http://www.rawbw.com/~rem/HelloPlus/loose.html#pre>
That validates 100% correct with loose DTD.
I made a copy of that, and just changed the top of the file to be
strict, and got 11 (eleven) validation errors. Out of desperation,
I deleted *all* content between the <body> and the </body>, but I'm
still getting 1 (one) validation error:
<http://www.rawbw.com/~rem/HelloPlus/strict.html>
What change is needed to satify the validator when using the strict DTD?

After you tell me how to make the validator happy with no content >
A short answer is, you can't, you need to at least have some content
whatsoever in the file, next I'll try copying across just one item
at a time from the loose file to the strict file, trying to get it
to validate correctly before copying across the next item. But I'm
not going to even try that until I can get an empty-content file to
validate.

If and when I start copying content across, is there any tutorial
that will suggest ways of making the conversion? Or will you be
available to tell me what I'm doing wrong and how to fix it each
time I copy across just one new item and get another bunch of
validation errors?
You should go and read some good HTML tutorials.
http://www.htmldog.com/guides/htmladvanced/recap/
They have some good tutorials on that site as well.
 
A

Andy Dingley

I tried that for the first time today. It was a horrible failure.

It wasn't horrible, it was quite minor. It's in the nature of
validation problems that one trivial error can be reported as hudreds of
instances further down the page.

Mostly you're falling foul of the new requirement in Strict that you
can't place bare text on the body of a page. Everything must be inside a
<div>, <p> or similar.

Really you should comply with this. Your <h1> and <pre> are OK, and you
just need to wrap the rest up inside <p>...</p> elements as needed. Get
away from this <p></p> as a "paragraph separator" idea and start using
the tags to mark the beginning and ends of real paragraphs, with content
in them.

If you can't even face this, then cheat. Place one huge <div> just
inside <body>, like this:


</head>
<body>

<div>

[...]

</div>

</body>
</html>
 
J

Joel Shepherd

John Hosking said:
There is no good reason for anybody (including yourself) to expect that
you can publish to the WWW (a largely graphical space based on data
access enabled by the electronic transmission of said data) without a
graphical browser and electronic transmission capability.

Huh? What on earth prevents one from writing and publishing a plain ol'
HTML document, with text content and simple, non-graphical markup, to
the Web, with a plain ol' dial-up connection? Sure, you're not going to
build another Amazon that way, and no one is going to give your site a
reward for prettiness, but so what. You can still publish useful content
in an accessible way.
People can (and do) argue about specific lists all the time, but if you
can't or won't test in *at least* IE6 and a version of Firefox, you
shouldn't bother publishing.

Exactly what is there to "test" with <p>, <h1>, <strong> and the like?
You don't need a graphical browser to "test" a basic page with textual
content; and there's absolutely nothing prohibiting one from publishing
such a page. Depending on the content, such a page could be far more
useful and information-rich than most of the ad-, flash-, ajax- and
image-laden crap swirling around out there.
 
R

robert maas, see http://tinyurl.com/uh3t

From: John Hosking said:
you sound like a home construction contractor who wants to build
homes for a living, but doesn't own a power saw, ...

Your metaphor is wrong on several counts:
- I'm not trying to get a job as the contractor, the "top dog" in
the construction company. I'm just trying to get a job as a
worker, somebody who contributes to the project. The contractor
supplies all the tools. I don't need to bring my own power saw.
(Construction = computer programming in the metaphor. I'm just
trying to get a job writing software, not managing a whole
software development company.)
- Even if I were the contractor himself, the fact that I write out
my bills longhand, or use a manual typewriter, or edit them as
plain text and print them, shouldn't give the customer a reason
to refuse to pay their bill for my company's work just because I
don't submit the bill in MicroSoft Word format. Why should a
constructor need MicroSoft Word? It's irrelevant to the work.
(Several recruiters/agencies require I submit my resume in
MicroSoft Word format before they'll consider referring me to a
job. I think they're being unfair and should get into another
line of work.)
- I'm not charging money for what I'm doing on the Web. Except for
the CGI applications I'm not even asking somebody to hire me. If
your next door neighbor wants to build you a bookcase, for free,
and then stock it with autographed books he wrote himself, you
shouldn't complain that he didn't use a power saw to build it,
and that his books weren't prepared with MicroSoft Author.
- As somebody pointed out later in this thread, I'm just trying to
organize information in a novel way, and satisfy the validator
so that I won't get harassing posts about how my Web pages
aren't even valid HTML because they fail validation, so because
they aren't valid HTML then their content and organization can
be rejected without even looking beyond the validation failure.
I'd also like really basic stuff like the location of blank
lines to be basically correct, so they don't detract from the

flowing text. After all, if you saw a blank line in the middle
of what you thought would be a contiguous block of floating
text, wouldn't that sort of distract you from reading the text?
(Inappropriate blank line added above deliberately to demonstrate my point.)

Anyway, I got the answers I needed about what I was doing wrong
that caused validation to fail on line 1353 (shit, I have that
number memorized now, and sounding out the decimal digits as
musical notes it's like the theme of some spooky science fiction
program), namely that the instructor's advice to use non-container
tags <tag/> or <tag /> was totally wrong because per SGML semantics
they start NETs, which I never heard of before because they are
never actually used in HTML, because there aren't any commonly used
browsers that support that stupid trick that saves a few keystrokes
at the expense of obscuring the syntax.

So now, as I the neighbor try to build your bookcase for free, I
notice I have a slight difficulty, that my manual saw has no way to
get into a certain crevice, so I ask a couple people if they have
any ideas how I might chip off that blank line sticking out of one
end of the bookcase, looking sort of ugly, but nobody has any idea
how, one person (later in the thread) says it's *impossible*, but
if we look at the bookcase from a different angle, the MicroSoft IE
angle, we won't see the blank line sticking out, so never mind
about it. Maybe I'll just do that.
When you say, "I have no way to see how it might look in some
other browser," you're following in the footsteps of so many
folks who designed only for IE (or earlier, only for Netscape)
because that's all they had. Such pages are a plague on the Web
still today.

There's a certain risk of that perhaps, but those people were
taking advantage of subtle differences between IE and other
browsers to make things look "just right" in IE, sometimes using
features that aren't valid HTML markup at all, but "work" in IE
because IE supports the extra markup. AFAIK I'm not doing any such
thing in lynx. I'm writing plain vanilla HTML, not doing anything
that is lynx-specific. (In fact I don't know *any* markup that lynx
supports that isn't standard HTML, unless you count *ignoring* some
things that are supposed to be proper SGML, such as NETs, or being
sloppy about invalid HTML such as non-closed <li> elements within a
<ul>. But thanks to the validator, and actually thanks to that
cruddy "Web Design" class 2.5 years ago, I've purged non-closed
<li> elements long ago, and thanks to the help in this thread I'm
in the process of removing containerless tags, that are really
supposed to be starts of NET in SGML, even if they aren't really in
HTML, as fast as I notice them.

I do have one present worry. With the "loose" DTD (I'm not using the word
"transitional" more in discussions about it
because it causes too much confusion), it allows the following trick:
Text that introduces a list:<ul>
<li>First item</li>
<li>Second item</li>
</ul>

The effect is that the text that introduces is immediately adjacent
to the first list item, no blank line between them. Is that
guaranteed behaviour, or is that only in lynx where that's the
effect achieved?

Now at the *end* of a UL element, there's always a blank line, just
like with a PRE element, but I never have running text that I want
adjacent to the bottom of a UL element, so that's not the problem
that it is with PRE, in fact I always *want* the blank line after a
UL element. But I'm worried about the line just before the UL
element, which is supposed to introduce or act as a title for the
list items. Do all browsers present it without blank-line gap?
Coding for Lynx only won't get you many friends,

Given that nothing I've ever done in my entire life has gotten me
even one friend, that's pretty much moot/par.
or technical support.

I assume you're talking about free technical support from other
users, such as the folks on this newsgroup, not formal professional
paid technical support from the vendor of lynx. Am I the only
person in this entire newsgroup who has access to lynx and has
experience matching the HTML with the the way lynx renders it? Is
there nobody who has figured out a lynx problem I haven't yet
figured out, who could help me get past an obstacle? Is there any
other newsgroup with a larger number of lynx users where such
questions might find better answers?
My recommendation is that you write the content and forget the
publishing part.

I'm not sure which aspects of the HTML you consider "the publishing
part".
When your work is done, somebody else can mark it up or help you
mark it up, and then publish it, or help you publish it *once*.

An online reference like this will never be **done**. There will
always be little improvements and/or additions I think of from time
to time. I'll re-interpret your word "done" to mean "substantially
complete". I have no idea how to find somebody else to help me mark
it up for free, and I have no money to pay for somebody's help.

I'm also not sure what you mean by "and then publish it". It's
already "published", in the sense of Web accessible, from the
start. Do you mean like actively promoting it, advertising to get
more readers, or what?? Do you mean I should at some point when I
have some spare cash, get a brand-new throwaway account on some
spam-friendly ISP, and blast an e-mail advertisement to six hundred
million victims worldwide, which will cause cancellation of that
account but I have to do it only once?
I hesitate to mention the tool at http://www.browsershots.org/ ...

I didn't notice any hesitation. You seemed to jump right in and
mention it without any prodding. It submits my Web page to several
different browsers, and posts screen shots to their master index. I
suppose then I go to the public library to view their screen shots?
But the public library already has recent versions of IE and
Mozilla, so I'm not sure how that would help me. Explain?
 
R

robert maas, see http://tinyurl.com/uh3t

From: I V said:
... coding for Lynx only is not the worst thing you could do;
after all, it involves just writing good semantic HTML,

Yes, thank you for understanding what I'm trying to do.
which there's plenty of technical support for right in this
newsgroup.

Well, mixed in with lots of derogatory remarks which distract from
the technical support.
The OP's problem seems to be that he wants to write for Lynx
_and_ control the formatting of his pages. Unlike writing pages
for IE6 only, that's not really harmful, it's just impossible.

If it's impossible, should I continue to ask questions whether
specific things are possible or not, or just assume
*everything*whatsoever* is impossible and give up totally?

I thought that really simple things like choosing where there will
be blank lines between sections of text and where there will be
forced line breaks without any blank line would be covered by the
basic HTML markup language, but I guess not, sigh.

By the way, somebody in this thread suggested the CODE element as
an alternative to the PRE element. I tried it just now: It doesn't
do any line break at all, just runs all the code inline with the
paragraph, so that's definitely not the effect I want, not even
close. I think whoever suggested I use a CODE element was just
trying to disrupt everything. I think the Sci-Fi term is "berserker".
 
R

robert maas, see http://tinyurl.com/uh3t

From: "Chaddy2222 said:
A short answer is, you can't, you need to at least have some content
in the <body> eloment,

I think you made a suggestion about that later, so I'll set it aside.
you also need to have character encodeing and other things, a
charset for one.

I already have a line that says:
<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
What else do I need for charset??

As for character encoding, what's needed for that?
<http://www.w3.org/TR/html4/sgml/dtd.html> doesn't say anything
directly about that, but does refer me to RFC2045:
Multipurpose Internet Mail Extensions
(MIME) Part One:
Format of Internet Message Bodies
RFC 822 header fields
entity-headers := [ content CRLF ]
[ encoding CRLF ]
which doesn't seem appropriate to use in Web pages.

http://www.w3.org/International/O-charset
* Send the 'charset' parameter in the Content-Type header of HTTP.
Example:
Content-Type: text/html; charset=utf-8
Hmm, in my CGI applications I do just the first part of that, for example:
print "Content-type: text/plain\n\n";
Should I include the charset part too?

As for regular (static) HTML Web pages, I have no idea what my
ISP's server is including as the Content-Type header, and no idea
how to easily find out what it might be. Any suggestions? Do you
have a tool for checking what Content-Type header is presented when
you get the page at this URL?
<http://www.rawbw.com/~rem/HelloPlus/loose.html>

* For HTML or XHTML served as HTML, you should always use the <meta>
tag inside <head>. Example:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
I do that already. For example:
<head>
<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
<title>Recent HTML problems</title>
</head>

But somebody here said that is a cheap trick to fool something, I
forget the exact wording.

Values for the encoding attribute can be found in the IANA registry.
Note that these are called charset names, although in reality they
refer to the encodings, not the character sets.
Great!! More confusion.
You should go and read some good HTML tutorials.
http://www.htmldog.com/guides/htmladvanced/recap/

I took a quick look. I'll study more later and maybe get back to you.
 
R

robert maas, see http://tinyurl.com/uh3t

From: Andy Dingley said:
Mostly you're falling foul of the new requirement in Strict that
you can't place bare text on the body of a page. Everything must
be inside a <div>, <p> or similar.

Which of those is appropriate for running text that leads into a UL element?
If you can't even face this, then cheat. Place one huge <div> just
inside <body>, ...

OK, I'll try that right now ... done, and now it passes both validators:
<http://www.rawbw.com/~rem/HelloPlus/strict.html>
Thanks!

Now I can start copying actual content across to that file later today.

By the way, I agree that's cheating, because according to
documentation the purpose of the DIV element is so that authors can
apply style to sections of text, not so empty documents can pass
validation.
 
I

I V

If it's impossible, should I continue to ask questions whether
specific things are possible or not, or just assume
*everything*whatsoever* is impossible and give up totally?

What you need to do, I think, is distinguish between content and
presentation. You can use HTML's full power to mark up the semantics of
your content, and test that with Lynx. What HTML isn't (generally)
designed to do is specify the appearance of your web page, so if you're
designing your page for HTML-only browsers, I think you'll have to accept
that you can't necessarily make it look how you want. The boundary between
content and presentation isn't always 100% clear, though, so if you're not
sure whether (from an HTML point of view) something counts as presentation
or markup, it would make sense to ask.
I thought that really simple things like choosing where there will be
blank lines between sections of text and where there will be forced line
breaks without any blank line would be covered by the basic HTML markup
language, but I guess not, sigh.

Spacing between blocks of text is I think pretty clearly a presentational
issue. One way to think about this is: could I convey the same information
with different presentation? And, in the case of spacing between
paragraphs, you could present the same semantics in a different way (e.g.
indenting the first line of a new paragraph), so you shouldn't expect to
be able to control that in HTML.

HR and BR are slight oddities here - they have some semantic content
(something like "break between two sections" and "break between two
sub-paragraph level units," respectively), but they also have
presentational meanings. Try and use them with these semantics in mind,
not just for their presentational aspects.
By the way, somebody in this thread suggested the CODE element as an
alternative to the PRE element. I tried it just now: It doesn't do any
line break at all, just runs all the code inline with the paragraph, so
that's definitely not the effect I want, not even close. I think whoever
suggested I use a CODE element was just trying to disrupt everything. I
think the Sci-Fi term is "berserker".

CODE is an inline element. The element makes sense if you want the lines
of code to be part of another paragraph, but in that case you would
(generally) not want to split the lines, I think. You could do:

<p>
Here is an example: <code>Line 1<br>
Line 2<br>
Line 3</code>. That was an example.
</p>

But I think that would look a bit bizarre.
 
J

Jukka K. Korpela

Scripsit robert maas, see http://tinyurl.com/uh3t:
That's a snide way of implying that you're better than me

You seem to have a serious problem with your self-esteem. Please try to
solve it somewhere else than in this group.
So **** off with your stupid remarks

You seem to have a serious problem with your public conduct and behavior.
Please try to solve it somewhere else than in this group.
OK, we're in agreement that the instructor was incompetant to teach
the class she taught. Now what alterative advice do you have for me
now?

It seems that reading a good book is out of the question, but that's what
you would really need. You are thoroughly confused with HTML, perhaps due to
wrong teaching, and you need a fresh start - not endless answers to endless
questions based on the confusion.

Of course, this advice was much more than you deserved. If you now realize
that you have gone far too far in your misbehavior here, you may have some
chances of getting help in future, _after_ you've read a good book on HTML
and _after_ you've read the basics of Usenet netiquette. (You will probably
then have learned to write a proper From field, too.)
 
R

robert maas, see http://tinyurl.com/uh3t

From: Joel Shepherd said:
Huh? What on earth prevents one from writing and publishing a plain ol'
HTML document, with text content and simple, non-graphical markup, to
the Web, with a plain ol' dial-up connection? Sure, you're not going to
build another Amazon that way, and no one is going to give your site a
reward for prettiness, but so what. You can still publish useful content
in an accessible way.

Thank you for sticking up for me against the people who seem to
believe that without a flashy presentation the content must be
worthless.
Depending on the content, such a page could be far more useful
and information-rich than most of the ad-, flash-, ajax- and
image-laden crap swirling around out there.

Indeed, whenever I go online with a full graphic Web browser and
try to do anything with any of the commercial sites such as Yahoo,
I'm constantly blasted by vibrating rotating swirling crap that
constantly distracts me from trying to keep focused on what I'm
actually trying to read. Even the animated GIFs at NASA are
annoying. (Actually even the animated company logo in the Web
browser itself is annoying!!)

By the way, the one time I tried my hand at graphical content, when
I was taking that "Web Design" class 2.5 years ago, IMO I have no
artistic talent whatsoever and what I created looks like crap,
despite the fact that I learned some of the technical means for CSS
and embedded images etc. And of course I wasn't inspired for any
content either, so to satisfy class assignments I just cobbled
together whatever I could find that was easy to find that would
satisfy the assignments. So IMO what got me "A"s for grades in the
class is total crap actually. I hope you agree:
<http://www.rawbw.com/~rem/CIS89a/>
(And of course the instructor never told us about the validator, so
none of those class Web pages validate either.)
But at least I know some of the methodology, and have some samples
of non-complicated stuff I did myself and understand how I did it,
so if I ever have regular access to a fullfledged graphics Web
browser in a development environment, I can go back to those class
Web pages as examples to remind me how to do that stuff again.
 
J

John Hosking

Joel said:
Huh? What on earth prevents one from writing and publishing a plain ol'
HTML document, with text content and simple, non-graphical markup, to
the Web, with a plain ol' dial-up connection? Sure, you're not going to
build another Amazon that way, and no one is going to give your site a
reward for prettiness, but so what. You can still publish useful content
in an accessible way.


Exactly what is there to "test" with <p>, <h1>, <strong> and the like?
You don't need a graphical browser to "test" a basic page with textual
content; and there's absolutely nothing prohibiting one from publishing
such a page. Depending on the content, such a page could be far more
useful and information-rich than most of the ad-, flash-, ajax- and
image-laden crap swirling around out there.

I did not make myself understood. My words were poorly chosen, too
generalized in my attempt to keep things simple.

I am not suggesting that pages (of the OP or anyone else) need to be
slick, snazzy, flashy, Flashy, or animated. I require no particular
abundance of color. Simple is just fine with me, and has been from about
the fifth week of my experience with the web.

What I meant to do was to reply to the OP's obstinate insistence that
only *his* browser environment was important for his pages. You snipped
the part of his message that I was responding to (and there were other
exchanges further upstream), but he was giving what I saw as excuses for
why he couldn't possibly *know* what IE users saw because he only has
the one computer with what I presume to be 5 1/4" single-sided floppy
drives and a flaky 300 baud modem. I inferred that since he couldn't
*possibly* know what graphical browsers showed he thought he didn't need
to *care*.

None of that would matter if he wasn't getting all uptight about what
*his* Lynx browser -- not any version of IE, or Firefox, or Opera, or
Safari, etc., because I believe he said somewhere in this god-forsaken
thread that they didn't matter to him -- on his VT100 did spatially with
the <pre> element.

I admit to a withering despair concerning our brother Robert and I
thought the best advice would be for him to concentrate as best he can
on one thing (his text) before shifting his attention to one other thing
(appropriate, valid markup). When he's managed that, he can then move on
to the next thing (putting it online). A dispersion of concentration
seems to be detrimental to reaching his goals.

As you say, testing "<p>, <h1>, <strong> and the like" wouldn't
ordinarily be a big deal, but the OP is all tangled up with the "extra"
spacing from <p> tags [sic] and <pre> elements, so he'll probably want
to spend time "testing" the look of these on his paleo-browser and,
potentially, browsers that the rest of the planet might use.

In closing, I agree wholeheartedly that such a page could be far more
useful and information-rich than the common crud. I hope his work is
fruitful.
 
J

John Hosking

robert said:
Your metaphor is wrong on several counts:

Yes, you're right; I should never have mentioned it.
I do have one present worry. With the "loose" DTD (I'm not using the word
"transitional" more in discussions about it
because it causes too much confusion), it allows the following trick:
Text that introduces a list:<ul>
<li>First item</li>
<li>Second item</li>
</ul>

The effect is that the text that introduces is immediately adjacent
to the first list item, no blank line between them.

....in your version of Lynx, presumably because that's what the Lynx
developers thought would be good behavior in that situation. You're
lucky you like that behavior. It's surprising behavior (to me), though.
Do you mean the results look like this:

Text that introduces a list: * First item
* Second item
Subsequent text following but not a part of the list
? That's what I understand you to mean, but it's weird.
Is that
guaranteed behaviour, or is that only in lynx where that's the
effect achieved?

The correct, theoretical answer to this question is, "check the W3C
standards (for that level of HTML which you're claiming to use)." But I
think you will find, if you do that (at, for example,
http://www.w3.org/TR/html4/struct/lists.html#h-10.2), that the W3C has
nothing particular to say about spacing before or after a UL or OL
element, although it is a block-level element (like <p>, <pre>, or
<hr>). The practical answer is, "no," based on the fact that in 45
seconds I tested it in IE6 and Firefox 1.0.something and Opera 7.23 and
it didn't work that way in any of them. Unless, *sigh* I misunderstood
the behavior.
Now at the *end* of a UL element, there's always a blank line, just
like with a PRE element, but I never have running text that I want
adjacent to the bottom of a UL element,

It would be strange if you (or anyone) did.
so that's not the problem
that it is with PRE, in fact I always *want* the blank line after a
UL element. But I'm worried about the line just before the UL
element, which is supposed to introduce or act as a title for the
list items. Do all browsers present it without blank-line gap?

See above.
I assume you're talking about free technical support from other
users, such as the folks on this newsgroup, not formal professional
paid technical support from the vendor of lynx. Am I the only
person in this entire newsgroup who has access to lynx and has
experience matching the HTML with the the way lynx renders it?

I think, sir, that you are the only person here recently for whom Lynx's
behavior is a crisis situation.
Is
there nobody who has figured out a lynx problem I haven't yet
figured out, who could help me get past an obstacle? Is there any
other newsgroup with a larger number of lynx users where such
questions might find better answers?

There is but I don't imagine they're too interested
in discussing HTML issues there. Lurk there for a while and see.
I'm not sure which aspects of the HTML you consider "the publishing
part".

I meant the part where you mark up your text as HTML and post to to the Web.
An online reference like this will never be **done**.

I see now.
I'm also not sure what you mean by "and then publish it". It's
already "published", in the sense of Web accessible, from the
start. Do you mean like actively promoting it, advertising to get
more readers, or what??

No. I just meant publishing it, not publicizing it.
I
suppose then I go to the public library to view their screen shots?
But the public library already has recent versions of IE and
Mozilla, so I'm not sure how that would help me. Explain?

I see now. Your public library is better equipped than you are, so for
the particular versions of IE and Mozilla available at the library, such
a site would be no help.

HTH
 
R

robert maas, see http://tinyurl.com/uh3t

From: John Hosking said:
I am not suggesting that pages (of the OP or anyone else) need to
be slick, snazzy, flashy, Flashy, or animated. I require no
particular abundance of color. Simple is just fine with me, and
has been from about the fifth week of my experience with the web.

Good, we're in agreement to this point.

(Referring to me, the OP:)
he was giving what I saw as excuses for why he couldn't possibly
*know* what IE users saw

More like it takes hours/days/weeks between the time I make a
chance to my Web page until I have a chance to get to some place
where there's IE so that I can see what it looks like i IE. That's
too long a change-test feedback cycle to be of any use whatsoever
in development, so basically when I'm writing/adding/changing my
Web pages it's impossible to adjust my methods per what it might
look like in IE. I just have to check what I write against how it
looks in lynx and what the validator says (each available within a
minute or less any time I want to check my work), and just *hope*
it will come out right in Mozilla and IE and NetScape too.

So-far in fact I haven't had even one chance to look at any of this
in any of those browsers, because during the rare times I had
access to the other browsers I had much more urgent matters to do
during the limited time allowed (1.5 hours at Connect, or 1 hour if
a terminal happens to be available at public library, each a
half-hour bike ride from here, or half hour at a new place that
opened up much closer just a few days ago but has only one working
computer that has to be shared so I have to go there and sign up
for future slot then go back there later). But I finished most of
those more-urgent matters Friday, so hopefully on Monday I'll
finally be able to take a look for the first time.
because he only has the one computer

I have only one computer with working modem that would allow upload
or download of text, but both upload and download are very clumsy:
To upload, I start a 'cat' command on Unix, input from terminal and
output to file, copy some text from a text editor on my Mac, and
paste it into the VT100 emulator, watch it spew out with a
half-second pause after each newline, and finally when it's done I
press ctrl-D to end the transfer. Copy&Paste is limited to 30k
bytes at a time due to limit in MacOS. To download, I start a
'more' command on Unix, sit there pressing space manually over and
over until it's reached the end, then scroll back the VT100
emulator to find where the 'more' started, sweep the text with the
mouse to bottom of screen, then rest mouse on bottom of screen as
VT100 emulator auto-scrolls one line at a time, until I reach the
end (assuming it's less than 30k total), then copy what I've swept,
and paste into local text editor. If I want to up/down load more
than 30k at a time, I have to break it into <30k chunks. For
example, on upload I start the 'cat', sweep part of the local file
and use the "Statistics" command to verify my sweep is less than
30k, the copy that and paste, repeat until last chunk done, finally
ctrl-D. To download more than 30k, if the whole file will fit in
the VT100 emulator's scrollback buffer then I use 'more' to get the
whole file, but then I have to guess how much of what I did would
be less than 30k chunk, repeat that guessing, until I reach the
end. If it's too much for VT100 emulator's scrollback buffer, then
I have to run 'more' only partway through the file, do my sweep,
run 'more' some more, do another sweep, etc., which is so much
trouble that it's not really feasible to get correct.

Kermit is available, but it doesn't map newlines between Mac and
Unix, so I have to go into emacs and manually convert from Unix to
Mac before download or from Mac to Unix after upload, which isn't
worth the trouble except for really large files where breaking into
30k pieces is more pain than manually converting newlines.
with what I presume to be 5 1/4" single-sided floppy drives

No, never had one of those pieces of crap. You are deliberately being
derogatory/insulting at this point.
and a flaky 300 baud modem.

No. I used one of those for about ten years before I got access to
a 1200/150 split modem, which I used for a few years before I got
access to a 2400/2400 modem, which I used for a few years before I
bought this FAX/data modem which goes up to 56k but a different
standard from what PPP uses nowadays so the one time I tried PPP I
had to use 28k, but the VT100 emulator is limited to 19200 so
that's what I use all the time when on shell dialup.
I inferred that since he couldn't *possibly* know what graphical
browsers showed he thought he didn't need to *care*.

There's an old saying, which I'll re-phrase to avoid the stupid
religious aspect of the original: A good policy is to change what
can be changed, accept with what can't be changed, and know the
difference between the two. I know the difference between
interactive checking with lynx and validator, which I *can* do, and
interactive checking with IE/Mozilla/NetScape, which I can *not* do
at this time or in the foreseeable future, so I do the former and
accept lack of the latter. You seem to have it in your mind to
squeeze blood out of a turnip, and can't accept that it's
impossible. You seem to be insistant that I do something that is
beyond my present means, namely have a more expensive computer
system than I can afford, and use it to develop Web pages with
interactive use of IE/Mozilla/NetScape during development, and
won't be happy until you see that blood dripping out of that
turnip.

Do you *care* that we're all going to die, our whole species go
extinct, all life on Earth wiped out, in about one billion years
when increase energy from the Sun boils away the oceans? What are
*you* doing right now to prevent that disaster??

If you can't do anything about something, what's the point of
arguing whether you care or don't care about it?? It's a
methaphysical question if you can't do anything about it. Whether
you care about billion-year-hence extinction, or whether I care how
my Web pages look in IE, is moot since neither of us can do
anything about either. Now if somebody with access to IE would take
a look at my Web pages every few minutes while I'm actively working
on them, and send me an instant alert whenever I create something
that passes validation yet looks like crap in IE, that would allow
me to promptly fix anything I break before I go on to create ten
more copies of the same ugly format. But somebody volunteering to
help me like that ain't gonna happen so I'm not gonna worry about
it.
None of that would matter if he wasn't getting all uptight about
what *his* Lynx browser ... on his VT100 did spatially with the
<pre> element.

Well I'm just trying to get a flowing paragraph with a code snippet
in the middle of it. Apparently <pre> wasn't designed to do that,
so I'm stuck for a way to do it per HTML standard. <pre> almost
does it, sigh. It's so close, it makes me think it *should* do it
right. So if you want to include code snippets in the middle of
running text, how do you do it? For example, if you wanted an
effect somewhat like this:

Now once you somehow get lisp "interpretor" started, it'll probably
print out some banner identifying what version it is, then it'll enter
the read-eval-print loop. So you just type an integer literal on one
line, for example 42, and then press ENTER or RETURN, whatever the key
is on your computer for finishing lines of input, and lisp will print
that number 42 on a new line and then wait for further input. So
suppose you enter two numbers, with a space between them, such as
42 69
on a single line of input? Lisp will read the 42, and print it out
on a new line. Then lisp will read the 69 and print it out on another
new line. Then lisp will see you haven't typed any more input, so lisp
will wait for new input. If you have access to lisp, you should try
that right now.

The basic idea is that there's continuous flow of text, a single
"paragraph", but there's one line set out specially in the middle
of it, not wrapped automatically. How to achieve that effect? I'm
talking about semantic effect, line set out in middle of paragraph,
not the precise way it's formatted. Just that however it's
formatted, it shouldn't look like there are two separate
paragraphs. Here's another example, a long transcript (only part
shown here) with running commentary alternating with the
transcript. From time to time when the topic changes there's a new
paragraph started, but so long as the topic is the same it should
be just one big paragraph with snippets of transcript set out at
various places in the middle:

[First paragraph:]
Now I translate the single line of code in the body of the function.
(Note I don't need a return statement in lisp.)
(* n n)
9
Good, I got it right.

[Second paragraph:]
Now to build my function definition around that single line of code:
(defun sq (n)
(* n n))

[Third paragraph:]
Now to unit-test the function to see if it works.
(sq 4)
16
Good, it works.

[Fourth paragraph:]
Next I want to translate the function showsq into lisp. First I
translate each line separately. Because I used the same variable
name n, I already have a test value set up there. I check it just
to be sure:
n
3

[Fifth paragraph, very long, not all of it shown here:]
The first line of code to translate is: res = sq(n); which translates
to
(setq res (sq n))
9
Working, next to translate: printf("The value of ");
(princ "The value of ")
The value of
Working, next to translate: printf("%d", n);
(princ n)
3
Working, next to translate: printf(" squared is ");
(princ " squared is ")
squared is
...Working, next to translate: printf("%d", res);
(princ res)
9
Working, next to translate: printf(".\n"); which requires two lines
of code in lisp the way I've been doing up to now ...

Do you see how that whole bunch of transcript-with-commentary is
only five paragraphs (that fifth one rather long with repeated
set-out segments of transcript)? Ignoring how it *looks* in the
various browsers, what's the correct *logical* organization of that
text per HTML standard?? If I get the HTML correct, then I expect
all the various browsers will render in some way that is consistent
with that logical organization, *not* in a way that indicates some
*other* organization to the user.
I admit to a withering despair concerning our brother Robert and
I thought the best advice would be for him to concentrate as best
he can on one thing (his text) before shifting his attention to one
other thing (appropriate, valid markup).

But I'm not writing a novel, I'm writing a matrix, a hierarchial
table of contents linking to cells of informational text. From the
very start it has to be HTML, and it has to be online so that I can
check each new link I put in to make sure it really works, that it
takes the user from the clicked label in the table of contents to
the appropriate cell of informational text. And for the benefit of
anyone who might stumble into it expecting to get an answer to a
question, like how to convert an ASCII character code to the actual
character object, or how to search a string for the first character
*not* among a specific bag of characters, all items in the table of
contents for which there is no content yet are obvious stubs, just
[Topic] (plain text), instead of HREFs that go to blank pages or
even worse, so the user can see at a glance in the table of
contents which topics are covered and which aren't before clicking
on anything. On the other hand, I've been filling in specifics for
only c and lisp so-far, and c++ when it's identical to c, so
anybody looking for differences of c++ from c, or anything in java
or perl or PHP, will be disappointed for the moment, sorry. Maybe I
should put in a "status so-far" section with such general warnings?
... he'll probably want to spend time "testing" the look of these
on his paleo-browser and, potentially, browsers that the rest of
the planet might use.

No, "paleo" browser is what I found in the campus library at SCU
back around 1967: It was a "programmed text", where you read the
text on the first page and the see alternatives as to what page to
turn to next. It gave me an idea for doing the same sort of thing
for organizing information in a hierarchial way on a computer,
which I implemented circa 1970-71 on the PDP-10 at Stanford A.I.
lab. Apparently Richard Stallman at MIT got the same idea about the
same time, and implemented INFO mode in EMACS. I don't know whether
he was also inspired by seeing an old "programmed text" book, or
whether he thought of the idea originally.

Almost-"paleo" technology would be that mechanical card sorter I
saw used between 1964 and 1967, where you can sort on only a single
column at a time, so you sort on least significant column first,
then work your way toward most significant column last.

Half-"paleo" would be that first access to the Web that I ever had.
I'd find a URL somewhere in a newsgroup, and e-mail that URL to a
lynx-by-email service, and get back in a few hours or a day or so
the lynx-rendered page, with [number] for each link, and mapping
from [number] and URL at bottom. Then I'd find which URL I wanted
to follow next, and do another e-mail cycle. Often I'd get no
response after several days, so I'd have to try again. For a year
or two that's the only Web access I had. Being able to run lynx
live from my own shell account is sooooooo much better!!
I agree wholeheartedly that such a page could be far more useful
and information-rich than the common crud. I hope his work is
fruitful.

<GomerPileUSMC>Surprise, surprise, surprise</GomerPileUSMC>
So you like the general idea of a matrix coordinating different
data types, or the general idea of a "cookbook" that showed the
same task in several common languages side-by-side, or both ideas,
or just the idea of non-swirly organized information, or ...?

(Hmm, I think we've coined a new slang term, "swirly", which sounds
rather like "gnarly" and has similar meaning but specifically deals
with flashy visual effects swirling all over the Web page
distracting from the actual content, rather like the flashing
swirling lights all over the "midway" at a carnival/circus/fair.)

Before posting this I checked Google to see if the word was already
in use, yes it is, with different meanings, such as bogwash, and
something having to do with a prostitute or artist but I can't
figure out the precise meaning, plus the literal meaning applied to
Adobe Illustrator. No problem. It's OK to have the same slang word
with more than one meaning. At least *our* meaning is new, not
already in use. So next time somebody shows us their flashy
"wonderful" Web site, we can simply dismiss it as "too swirly for
my taste", as we lean over sideways, looking like we're going to
get dizzy and either fall over or vomit or both.
 
R

robert maas, see http://tinyurl.com/uh3t

From: John Hosking said:
...in your version of Lynx, presumably because that's what the
Lynx developers thought would be good behavior in that situation.
You're lucky you like that behavior. It's surprising behavior (to
me), though.

How would you *expect* that HTML to render?
Do you mean the results look like this:
Text that introduces a list: * First item
* Second item

No. It looks like this:
Text that introduces a list:
* First item
* Second item

It does *not* look like this:
Text that introduces a list:
(blank line here)
* First item
* Second item

So now that you mention it, what is the correct HTML way to build
an unnumbered list which has an introductory line at the top which
is logically *part* of the unnumbered list but *not* one of the
items in the list? For example how do you create a table of
contents which says "Table of Contents:" before the first chapter
item?

Also, what's the proper HTML way to build a hierarchial table of
contents?

Table of contents:
* Chapter 1: "before the Earth"
- Section: "Synthesis of hadrons"
- Section: "Condensation of plasma"
- Section: "Formation of galaxies"
* Chapter 2: "Earth before life"
- Section: "Formation of Moon"
- Section: "Late Heavy Bombardment"
* Chapter 3: "Life before eukaryotes"
- Section: "First replicators"
- Section: "DNA takeover"
- Section: "Photosynthesis"

How should that *structure* be specified in HTML?
It should render in all browsers vaguely like I drew it above, but
the details don't matter so long as it's obvious from the rendering
what the underlying orgaization is. For example, if it renders like
this:

Table of contents:
* Chapter 1: "before the Earth"

- Section: "Synthesis of hadrons"
- Section: "Condensation of plasma"
- Section: "Formation of galaxies"
* Chapter 2: "Earth before life"

- Section: "Formation of Moon"
- Section: "Late Heavy Bombardment"
* Chapter 3: "Life before eukaryotes"

- Section: "First replicators"
- Section: "DNA takeover"
- Section: "Photosynthesis"

That's grossly wrong because the visual effect is to lump the title
for chapter 2 with the sections for chapter 1, etc., confusing the
user/reader who is trying to figure it all out.
I think you will find, ... that the W3C has nothing particular to
say about spacing before or after a UL or OL element, although it
is a block-level element (like <p>, <pre>, or <hr>).

So it would be perfectly reasonable/allowable if some browser would
render the nested UL/LI/UL/LI structure that horrid way I showed
just above?? So is there any HTML that would specify such a nested
table of contents properly, even if some browsers render it as
garbage, at least it's structurally *correct* per HTML standards?
It would be strange if you (or anyone) did.

Well I can imagine a perverse case where somebody might want that,
for example somebody might be describing his travails at trying to
write a novel:

First I had four chapters:
* Lady meets guy
* Lady and guy fall in love
* Guy meets another lady
* Guy breaks lady's heart
but then I realized there's a missing step in there, so I
changed it to be like this:
* Lady meets guy
* Lady and guy start dating on regular basis
* Lady and guy fall in love
* Guy meets another lady
* Guy breaks lady's heart
then I thought to enhance the suspense I should leave out one of
the titles and let the reader guess what caused the sad part at
the end:
* Lady meets guy
* Lady and guy start meeting on regular basis
* Lady and guy fall in love
* Guy breaks lady's heart
but then I thought that was unfair. I ought to at least give the
reader a clue as to that surprise event, so now I have:
* Lady meets guy
* Lady and guy start meeting on regular basis
* Lady and guy fall in love
* Heather Thompson - what's she doing in here?
* Guy breaks lady's heart

Now it wouldn't totally break the logic for there to be a blank
line after each listing of chapters, but still it would break up
the flow of the story of the travails a little bit.

But that's moot for my present needs.
I think, sir, that you are the only person here recently for whom
Lynx's behavior is a crisis situation.

It's not a crisis, just something that's frustrating me. If it
looks better in other browsers I have no access to, then I'll have
to just live with it, knowing what I see here (slightly messed up)
isn't what most others see (as I intended by the markup).

Maybe if I can get on a full InterNet terminal tomorrow (Monday)
and view it in IE and Mozilla, if it looks fine there, I can stop
fussing over it. (But probably three other things that look fine in
lynx will look totally wrong in IE and/or Mozilla, and I'll be
posting a panic article tomorrow evening. Yeah, I have a
pessimistic kind of personality, as a result of many disasters that
have struck me already, and nothing really good ever happening!)
There is news:comp.os.lynx

'lynx' as I'm using it is a Web browser (user agent), not an
operating system, so that sounds more like the same word with
totally different meaning, unless the newsgroup name is a misnomer.
I'll take a look now ... yeah, LynxOS seems to be an alternative to
Linux, an operating system, probably in the Unix family too.
Red herring.
but I don't imagine they're too interested in discussing HTML
issues there. Lurk there for a while and see.

No, not worth the expense for zero expected benefit.
I meant the part where you mark up your text as HTML and post to to the Web.

Well that's necessary right from the beginning. Like I said,
there's no other way for me to check each link as I create it.
Your public library is better equipped than you are, ...

Yeah. They got some kind of state grant to pay for installing
InterNet terminals. Way back around 1991-92 when I approached my
local public library to show them my toplevel meta-index to the
InterNet, suggesting it might be a useful reference source to
include in their local collection, to help library patrons find
stuff on the InterNet, for example if they wanted to know where
there was a list of all mailing lists or newsgroups or major FTP
archives with specific kinds of software available for download,
the staff at the library said the InterNet is of no value
whatsoever to the library and they refused to allow me to even show
them my indexes. Then a few years later comes $$money$$ with a
mandate to install InterNet terminals, and suddenly their opinion
turns around completely, and promptly they purchase and install
InterNet terminals.

Me, I have no funding for anything, not even food.
 
S

Steve Pugh

Also, what's the proper HTML way to build a hierarchial table of
contents?

Table of contents:
* Chapter 1: "before the Earth"
- Section: "Synthesis of hadrons"
- Section: "Condensation of plasma"
- Section: "Formation of galaxies"
* Chapter 2: "Earth before life"
- Section: "Formation of Moon"
- Section: "Late Heavy Bombardment"
* Chapter 3: "Life before eukaryotes"
- Section: "First replicators"
- Section: "DNA takeover"
- Section: "Photosynthesis"

<div class="toc">
<h2>Table of Contents:</h2>
<ul>
<li>Chapter 1: "before the Earth"
<ul>
<li>Section: "Synthesis of hadrons"</li>
<li>Section: "Condensation of plasma"</li>
<li>Section: "Formation of galaxies"</li>
</ul>
</li>
<li>Chapter 2: "Earth before life"
<ul>
<li>Section: "Formation of Moon"</li>
<li>Section: "Late Heavy Bombardment"</li>
</ul>
</li>
<li>Chapter 3: "Life before eukaryotes"
<ul>
<li>Section: "First replicators"</li>
<li>Section: "DNA takeover"</li>
<li>Section: "Photosynthesis"</li>
</ul>
</li>
</ul>
How should that *structure* be specified in HTML?
It should render in all browsers vaguely like I drew it above, but
the details don't matter so long as it's obvious from the rendering
what the underlying orgaization is. For example, if it renders like
this:

Table of contents:
* Chapter 1: "before the Earth"

- Section: "Synthesis of hadrons"
- Section: "Condensation of plasma"
- Section: "Formation of galaxies"
* Chapter 2: "Earth before life"

- Section: "Formation of Moon"
- Section: "Late Heavy Bombardment"
* Chapter 3: "Life before eukaryotes"

- Section: "First replicators"
- Section: "DNA takeover"
- Section: "Photosynthesis"

That's grossly wrong because the visual effect is to lump the title
for chapter 2 with the sections for chapter 1, etc., confusing the
user/reader who is trying to figure it all out.

Most browsers will render the HTML I gave without such blank lines.
The only blank line is between the heading and the list. That can be
fixed with CSS and will have just be accepted for non-CSS browsers.
So it would be perfectly reasonable/allowable if some browser would
render the nested UL/LI/UL/LI structure that horrid way I showed
just above??

Yes. The details of presentation are outside the scope of HTML. HTML
is about semantics and logical structure. Presentation is the domain
of CSS.
So is there any HTML that would specify such a nested
table of contents properly, even if some browsers render it as
garbage, at least it's structurally *correct* per HTML standards?

See above. Note that the <ul>s for the sections are inside the <li>s
for the chapters. It's a common mistake to do something like this:

<li>Chapter 1: "before the Earth"</li>
<ul>
<li>Section: "Synthesis of hadrons"</li>
<li>Section: "Condensation of plasma"</li>
<li>Section: "Formation of galaxies"</li>
</ul>

But as you use a validator you probably wouldn't fall into that trap
as this is invalid code.

Steve
 
B

Blinky the Shark

John said:
Yes, you're right; I should never have mentioned it.

I think it works quite well with "carpenter" and "hand tools". I don't
think contractors supply carpenters with hammers and screwdrivers. And
I think that what he's lacking, in terms of hardware and connectivity,
really are the basic tools (IE sophisticated? Firefix costly? <g>), not
the power tools. And as for "carpenter" instead of "contractor", he
*has* said that he just wants to be the laborer.
 
J

John Hosking

robert said:
No, never had one of those pieces of crap. You are deliberately being
derogatory/insulting at this point.

Well, I was deliberately exaggerating. You got upset with Jukka, too,
although I didn't think he meant to insult your, uh, equipment. Don't be
so sensitive; some poor saps in Africa have lots worse connectivity and
have to make do as best they can. No insult deserved or meant.
You seem to be insistant that I do something that is
beyond my present means, namely have a more expensive computer
system than I can afford, and use it to develop Web pages with
interactive use of IE/Mozilla/NetScape during development, and
won't be happy until you see that blood dripping out of that
turnip.

I don't insist anything. Your finances are your business. I do suggest
you not worry about vertical spacing in various browsers until you are
in a position to try them out and compare results.
So if you want to include code snippets in the middle of
running text, how do you do it?

Using said:
For example, if you wanted an effect somewhat like this:

Now once you somehow get lisp "interpretor" started, it'll probably
print out some banner identifying what version it is, then it'll enter
the read-eval-print loop. So you just type an integer literal on one
line, for example 42, and then press ENTER or RETURN, whatever the key
is on your computer for finishing lines of input, and lisp will print
that number 42 on a new line and then wait for further input. So
suppose you enter two numbers, with a space between them, such as
42 69
on a single line of input? Lisp will read the 42, and print it out
on a new line. Then lisp will read the 69 and print it out on another
new line. Then lisp will see you haven't typed any more input, so lisp
will wait for new input. If you have access to lisp, you should try
that right now.

<p>Now once you... So suppose you enter two numbers, with a space
between them, such as... <code>42 69 </code>on a single line of input?
....right now.</p>

Others have addressed this (days ago) better than I will here, but the
above is where I'd start. I can style the <code> element with whatever
font, and as a block, with some spacing fore and aft, or inline with
Here's another example, a long transcript (only part
shown here) with running commentary alternating with the
transcript. From time to time when the topic changes there's a new
paragraph started, but so long as the topic is the same it should
be just one big paragraph with snippets of transcript set out at
various places in the middle:

Well, the first thing here, if you're trying for any semantic
correctness, is to mark your paragraphs as <p>. Right now, you've just
got anonymous text floating in your <body> (and that's *got* to be
uncomfortable ;-) ). Within the <p> elements then, mark up some <code>
(as Jonathan explained), or use <div> elements (as Jukka suggested), or
use <pre> and style it for those who can appreciate such things.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top