You are here: Re: What's wrong with this HTML (fails validation) ? « HTML « IT news, forums, messages
Re: What's wrong with this HTML (fails validation) ?

Posted by I V on 02/17/07 19:52

On Sat, 17 Feb 2007 10:09:05 -0800, robert maas, see
http://tinyurl.com/uh3t wrote:
>> From: I V <wrong...@gmail.com>
>> 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?

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.

 

Navigation:

[Reply to this 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

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