Reply to Re: div or table?

Your name:

Reply:


Posted by Barbara de Zoete on 02/13/06 01:44

On Sun, 12 Feb 2006 23:04:51 +0100, Jose <teacherjh@aol.nojunk.com> wrote:

>> Use the proper elements for the content you want to serve out to your
>> visitor. So a paragraph is a paragraph. A header is a header, a list
>> is a list, a table is a table, an abbreviation is an abbreviation.
>
> As a philosophy, I agree. But it doesn't always quite fit.

That's why there is a div and a span as elements. Still doesn't say
anything on how they are supposed to look.

> For example, I have a heading ("Seven pictures of Atlas") and the
> material for which this is a heading are in fact, seven .jpgs. But I
> want to have, under the heading, "compare these to Baal".

Something like (ugly variant):

<h1>Seven pictures of Atlas <span>compare these to Baal</span></h1>

<ol>
<li>pic1</li>
<li>pic2</li>
<li>pic3</li>
<li>pic4</li>
<li>pic5</li>
<li>pic6</li>
<li>pic7</li>
</ol>

And then:

h1 {
font-size:160%;
font-weight:bold; }

h1 span {
display:block;
clear:both;
font-size:135%; }

Or maybe (clean variant):
Just put <div class="remark">compare these to Baal</div> underneath the
heading, and create some appropriate styles for that div.remark. Since the
content really seems to be nothing else, a div is perfectly appropriate
for it.


> Why under? Because the subheading (I'll call it that for now) is
> subservient to and relates to the heading (or rather, to the material as
> a whole, which is embodied in the heading). The pictures are not
> subservient to the subheading, they are subservient to the heading. So,
> what I'm calling a subheading is not really a subheading, it's a
> something-else (for which there probably isn't an appropriate tag).

Hence the div or the span. I know and understand that. But that still has
nothing to do with your original question: use tables or divs for layout.
You're confusing markup and looks.

> I can do that easily if I skip the heading stuff, and just specify both
> heading and subheading as "body text", centered, with "bigger" and "not
> so much bigger" as type sizes. This tells humans what it is (by virtue
> of the style), but doesn't tell the browser what it is.

I know that certain markup has a certain look in graphical browsers (and
no where else). That is why it is possible to confuse the two. Try your
pages in Lynx or Opera (using the [Emulate Text Browser]) before anywhere
else. There you will see that you shouldn't confuse looks and semantics of
markup. Markup is to 'tell' a browser what something is. You style the
elements with CSS to tell the browser how things should look.

> Or, I can apply some styling to the header. This is closer to ideal,
> since at least we can call a heading a heading, but we are then =still=
> using style to convey meaning (which is supposed to be what CSS is
> trying to outlaw).

No. You are styling for the looks, and yes, that looks mean something to
the human mind. At least for those who get to see those looks. For all
others (text browser, braille browser, aural browser, screen reader) you
give meaning through correct markup, which in it self will get
interpreted. I don't have screen readers running, but I can imagine that a
heading gets read different from a div or a paragraph.

> It just isn't always the case that you can tell the browser what a thing
> is, because the browser just doesn't have a big enough vocabulary.

That is true. But there really is so much.


--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |

[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

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