Reply to Re: What's wrong with this HTML (fails validation) ?

Your name:

Reply:


Posted by robert maas, see http://tinyurl.com/uh3t on 03/10/07 10:35

> From: "Andy Dingley" <ding...@codesmiths.com>
> Depends on what you mean by "running text".
> If this is what I'd think of as "running text", then it shouldn't
> have any specifc markup around it at all. After all, it's just
> "running text", purely the content of the text block and running right
> into what I presume is an inlined list.
> <div>Omnia Gallia in tres partes divisa est <ul>
> <li>singul=EE</ul>
> <li>secundus</ul>
> <li>tertius</ul>
> </ul>
> </div>

Ah, indeed that's what I already did after you posted your article
but before I had time to read it and respond, except I have a
single <div>...........</div> surrounding a whole batch of
text<ul>...</ul> units. I don't know if it'll have the right
effect, haven't looked at it at all after doing it, will take a
look now in lynx, no way to view it in IE or Mozilla, anyway here
goes my first lynx-look since the big edit ... I got tired halfway
through CookTop, but it looked fine to that point. I found several
typos in Matrix, causing my interest to be maintained long enough
to lightly proofread all the way to the end. I found only one place
(*) where paragraph-breakage was wrong, and fixed it.

* (except for every fucking <pre>...</pre> which looks sucky now)

So how does it look to you in those other Web browsers you but not
I have access to?

> * You need to set the list (ul and li) to display: inline; with CSS.

I have no way to see what it looks like, hence no feedback whether
I'm doing the right thing or not. Will you agree to get on an IRC
channel with me, and give me live feedback, as I perform a batch of
edits like that?

> * It's a <div>, not a <p>. This is because HTML doesn't allow <p>
> to contain other block elements (like a list).

Yes, I was aware of that. The documentation for div seemed to
indicate that you aren't supposed to use it except when you want to
apply special formatting/style to such a portion of a document.
You're not supposed to just use it to fake inline text passing
validation. But there's really nothing else suitable, so a week or
so ago I decided to use div anyway. So what I already did and what
you recommend seem to agree.

> If you mean "A heading that runs into a UL element without any
> linebreak", then mark it up with <h2> etc. just as you'd expect.

Um, the "heading" is often more than one line of text. It's more
like a preface or introduction than what HTML calls a 'heading'. So
I don't think <h2> etc. would be allowed.

> Then use CSS and display:inline; to run things together, as
> needed.

Again, unless you are willing to spend time on IRC giving me live
interactive sight-for-the-blind as I do my edit, there's no point
in your telling me what I ought to do. (Perhaps color blind would
be a better metaphor. In fact in 5th grade my school teacher asked
me to do a favor: Accompany him to the supply room to show him the
various colors of paint needed for the class, because he was color
blind. He can see just fine, just can't see color. I can see text
just fine, but can't see color or font or size or style etc. when
using lynx via VT100 dialup.) In case you didn't see it yet:
<http://www.rawbw.com/~rem/NewPub/mySituation.html>

> Note that these two cases are semantically different, depending on
> what you intend this "running text" to represent. CSS lets them both
> be presented identically, but there is a conceptual difference between
> them and you ought to preserve this.

In the case of unnumbered lists with preface (but no trailer), it's
like a multi-line paragraph-style header, which AFAIK isn't at all
supported by HTML 4.x although earlier versions faked it just fine.
I'm afraid I have no alternative except nicely run on adjacent
lines in lynx but with a one-line gap in Mozilla and IE.

In the case of code examples, it's all one huge logical paragraph,
but with little insets every so often throughout the running text
of the paragraph. The blank lines after each pre in lynx are enough
of a pain, blank lines both before and after in Mozilla and IE are
a double pain that is so bad I'm thinking of indenting instead of
outdenting the code examples. I.e. use <br> to split lines, and
&nbsp;&nbsp; at the start of each line of code to indent it
relative to the main body of the paragraph. I just thought of that
idea after I was already done massively re-editing both CookTop and
Matrix to have proper paragraph and div structure around bodies of
text that do not or do have unnumbered lists within them. Maybe
when I feel like trashing most of that work I did, I might try that
alternate idea. Does it sound good to you?

The way it is right now, I end a paragraph before each pre and
start a new paragraph after the pre, totally breaking the logical
nature of paragraphs. But the<br>
&nbsp;&nbsp;first line of code<br>
&nbsp;&nbsp;second line of code<br>
would retain the logic of one huge paragraph with little sections
of funny stuff *within* that one big paragraph. So does it sound
like a winner, and my previous edit to make you happy last week was
a big mistake that I should undo in favor of my new idea? Or not?

By the way, on another project, I might create Web pages that have
lots of embedded images of Chinese characters, viewable in the
nearby lab where Chinese fonts aren't available.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация