|
Posted by Jukka K. Korpela on 02/15/07 16:03
Scripsit robert maas, see http://tinyurl.com/uh3t:
>> From: "Jukka K. Korpela" <jkorp...@cs.tut.fi>
>> Content-Type: text/plain;
>> format=flowed;
>> charset="Windows-1252";
>> reply-type=original
>
> That's not a valid charset to use for posting to newsgroups.
Windows-1252 is a registered character encoding, and any software used in
Internet matters needs to deal with it in order to be successful.
> Could you please use US-ASCII or ISO 8859-1 (Latin 1) instead?
I could, but I have good reasons not to. I use Outlook Express both for
domestic and other matters and both for email and Usenet, for the time
being, for reasons partly related to my working with IT books for the
general audience. Setting the encoding the way would have too many negative
side effects in other uses, see e.g. "Issues in Unicode email",
http://www.kolumbus.fi/jukka.k.korpela/unicode-email.html
> Well that depends on whether you consider the purpose of a
> validator to be:
> -1- Show the author where the error is, and explain what's wrong,
> so that the author can immediately fix it.
> -2- Flag the entire WebPage as INVALID, with no idea where the
> error actually is, so the author must post to a newsgroup
> asking for help, and spend several days before a single error
> can be fixed.
It's something between the two: a validator reports mismatches with the
document type definition (and errors in general syntax) in detail, but you
need to understand something about the formal definitions to understand the
messages. See
http://www.cs.tut.fi/~jkorpela/html/validation.html
Validators aren't really suitable for most web page authors, but in the
absence of better checking tools, they are useful.
> Well so-far all I've learned is that:
> While <tag /> is a perfectly acceptable non-container XML tag, it's
> totally invalid as such in SGML, generating completely different
> longuange semantics, therefore must be totally avoided in any
> WebPage that is supposed to be transitional between HTML and XHTML.
No, the point is simply that <tag /> causes errors in SGML validation. It's
actually "browser-safe", since browsers are so stupid. Just don't use <tag
/> in HTML 4.01, period. Use <br> and <hr>, which are the correct tags in
HTML 4.01.
> There's a second validator that is very much different from the W3C
> validator and can help diagnose errors where the W3C validator gave
> an error apparently unrelated to anything wrong in the syntax.
It's a phoney validator, because a program cannot be very much different
from a validator and still be a validator. There are snake-oil merchants
around; they sometimes even pop up in this group. You have been warned.
>> These days, you can easily use CSS to set the relevant
>> properties (margin-top and margin-bottom for applicable elements)
>> to zero, with the usual CSS caveats of course.
>
> The usual caveat is that it doesn't work, plain and simple.
It works in all browsing situations where the visual appearance really
matters. If you use a speech browser, or switch off CSS support, or use a
text-only browser, you must be interested in the content of pages only and
not their graphic excellence.
> The instructor required two things:
> - Set up header (doctype etc.) as transitional.
> - Never use an opening tag without the matching close tag.
That's simply wrong advice.
> So on another pending topic: Do you know any way to force a line
> break without causing a blank line? Do you know any way to avoid a
> blank line at the end of a pre block?
It seems that you have a problem with Lynx. Apparently Lynx prints a blank
line after a <pre> element, no matter what. If that's intolerable, just
don't use <pre>. You can mostly achieve the same result by using
<div>...</div> for each line or <div>...<br>...<br>...</div> if you find
that more convenient. You may wish to set font-family: monospace, for
browsers that use a different font by default. And you may wish to use
instead of spaces to make spaces non-collapsible, so this might get a
bit awkward, and you might reconsider whether the blank line is tolerable.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|