Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Physical and logical tags

5 views
Skip to first unread message

Daniel R. Tobias

unread,
Jan 12, 2003, 10:53:26 AM1/12/03
to
My own take on the "physical vs. logical" issue is in my site:

http://webtips.dan.info/logical.html

--
Dan

Jukka K. Korpela

unread,
Jan 12, 2003, 2:54:37 PM1/12/03
to
d...@tobias.name (Daniel R. Tobias) wrote:

> My own take on the "physical vs. logical" issue is in my site:
>
> http://webtips.dan.info/logical.html

The following (nice) formulation made me think that the difference
might be subtler than we (or I) have used to think:
"The physical tags represent specific visual effects which are intended
to be reproduced in a precise manner, and carry no connotation as to
their semantic meaning."

I think I've seen, and I may have written, that physical markup lacks
logical meaning. That isn't really true, or at least it's potentially
misleading. I'm not quite happy with Dan's formulation either. Physical
markup does not _define_ the semantic meaning (except in the trivial
sense where we might say that the visual presentation _is_ the
meaning), but it _may_ carry a _connotation_, at least when taken in
context.

For example, the effect of <b><font color="red">...</font></b> would,
in usual visual presentations, strongly suggest some potential meanings
to human readers. Probably a warning or something like that. But it
does not _express_ that in a well-defined way which would make it
possible to design different renderings for different presentations
(including those where neither bolding nor using red color is even
possible). - There's currently no markup for warnings in HTML, but
using <strong> or <em>, typically with a class and some style sheet,
will have to do.

Similarly, if you use just <br> between paragraphs and
&nbsp;&nbsp&nbsp; at the start of each paragraph, this does not
express paragraph structure _in markup_ but it has strong
_connotations_ when viewed under "normal" circumstances.
And it will fail rather poorly in speech presentation - lack of audible
paragraph structure is pretty bad.

Physical markup is also horrendously inflexible. The "literary style"
of paragraph presentation can be much better achieved by using <p>
and a style sheet than using kludges like the above. There are much
more alternatives to fine tuning the appearance (like the amount of
indentation and vertical spacing, where there are imaginable
alternatives between no spacing and one line's worth of spacing) and
even switching to completely different presentations.

To take yet another example, using <font> markup instead of <h1>, <h2>,
etc., markup will fail not only in speech synthesis and several visual
presentation modes but also in automated processing, e.g. when an
indexing robot picks up words used in heading to give them more weight
relatively or when a browser automatically constructs the list of
headings on a page.

Thus, there are basically three arguments in favor of logical markup
instead of physical markup:
1. Logical markup can be mapped to varying physical presentations
depending on presentation medium.
2. Logical markup can be automatically processed in a manner that
is based on the defined logical meanings of elements.
3. Logical markup leads to more flexible ways of affecting the
visual presentation and creating alternative presentations.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

andkonDOTcom

unread,
Jan 12, 2003, 3:29:48 PM1/12/03
to
d...@tobias.name (Daniel R. Tobias) wrote in message news:<aab17256.03011...@posting.google.com>...

> My own take on the "physical vs. logical" issue is in my site:
>
> http://webtips.dan.info/logical.html

Let me paste your entire thing in here and critique it... My response
is in "--"


Dan's Web Tips:
Physical vs. Logical Markup

TIP:Know the difference between physical (visual) HTML tags and
logical (structural) ones, and when to use one or the other.

There are two basic types of HTML tags. The logical tags represent the
structure and meaning of a document, with only suggested renderings
for their appearance which may or may not be followed by various
browsers under various system configurations. The physical tags


represent specific visual effects which are intended to be reproduced
in a precise manner, and carry no connotation as to their semantic
meaning.

--The fact is that visual inline tags DO carry connotations. That's
why people WOULD understand <b> to be important.

The original implementation of HTML contained almost entirely logical
tags, in accordance with the HTML philosophy that it was a structural
language rather than a screen-layout description. A few physical tags
slipped in even back then (such as <B>for boldfaced text). As HTML was
augmented by browser-makers Netscape and Microsoft, a large number of
physical tags were added, with very little augmentation of the logical
tag set. The HTML 4.0 standard attempts to remedy this balance by
introducing some new logical tags and declaring some of the physical
tags and attributes as "deprecated" in favor of stylesheets.
HTML style advisors have given varied and conflicting advice about
whether to prefer the use of logical or physical tags. Hard-line
purists may say to use only logical tags at all times, while some
graphical designers advocate using only physical tags (because the
logical ones have the tendency, distressing to those of a visual
mindset, to be rendered in widely varying ways). I don't follow either
rigid standard; rather, I support using whichever tags make sense for
the particular application.

--We can see both camps of purists and graphical designers are wrong.
Some hardliners themselves are hypocrites (such as Chippy) and the
reason we should ONLY use visual inlines is NOT because it may render
different. It is purely philosophical: we always have either too
little or too many logical tags.

When to Use Logical Markup

Try to use the logical constructs whenever they fit the meaning you're
trying to convey. When you want a header at the top of a page, the
<H1>tag is a good choice. The alternative of using a physical <FONT
SIZE="+3">tag has the negative effect of not logically connoting a
header; any program that attempts to create a structural outline of
your document from its headers will be frustrated when you don't mark
them as such. A text-mode browser like Lynx, and a reader program for
the blind, may have a manner of its own to signal a header to the
user, and this will be inoperative on your document when you signal
that with a font change that's meaningless on these other devices.

--I support the current block level tags, such as hx and blockquote.
However, the reasone people use <font size="+3"> and not <h1> is
because they have not been educated in CSS. I myself use <hx> at
times, such as my articles at stuf archives which use both <h1> and
<h2>. Block level elements give the structure of the page anyway, we
shouldnt look for it in petty inline elements. What is <strong> for
the author is not going to <strong> for the reader (in his mind not
display or anything) so it is silly to expect inline tags can supply
us with structural meaning.

There are a number of logical tags that have specific meanings that
may be useful to you. <CITE>is used to surround the title of a work
being cited (usually rendered in italics). <EM>designates emphasized
text, and

--Notice how <cite> goes against American standards of bibliography.
Articles in """, books in italics, and publisher names in plain text.

<STRONG>designates strong emphasis, usually rendered in italics and
bold respectively. The advantage of using the logical rather than the
physical tags in these cases is that your meaning is more precisely
conveyed. The fact that

--The meaning is taken from the fact that people know connotations of
bold and italics, etc. No wonder the logical tags use the five simple
inline visual tags.

the mass-market browsers don't actually do anything with these
distinctions at the moment is no reason to let them slide; other
software can still take advantage of them when indexing or abstracting
your documents. Not to mention

--What other software? Obscure closed systems? Or google's beta
acronym finder which doesnt even use <acronym>?

stylesheets: A site full of hard-coded physical markup will be much
harder to convert to stylesheet use than a site with a clean, simple
logical structure.

--True, use <span> instead of <font> tag soup and such.

If you get out of the graphical-artist mentality that demands
pixel-perfect

--I think we can agree that at least I have shown that pixel-perfect
and non-logical tags are NOT in the same camp.

control of your site's rendering, you'll be able to convey your site's
meaningin a sensible, platform-independent way. Try not to defeat the
logic of HTML by avoiding the logical tags just because you don't like
what some of them look like on some browsers. For instance, some
designers don't like how paragraphs

--The bigger question is: we have too many or too few. <cite> is too
general and incorrect, while <article> <book> <publisher> are to
explicit.

are rendered, so they use a line-break followed by an empty graphic to
indent the next line. This sort of thing is not generally a good idea,
as it's likely to degrade poorly under different environments (e.g.,
text-only browsing) and obscure the structure of your document for
indexing robots. Learn how to use stylesheets, and you can define the
look of the logical elements of your pages in a much more flexible way
than you ever could with physical markup.

--You might have fallen into thinking that people who use visual tags
are going to be control-obsession freaks. For the most part perhaps,
but I clearly dont use visual tags and still have a site with flexible
non-obsessed layouts that work from (maybe havent checked) in cell
phones to big screens.

When To Use Physical Markup

When you want to achieve particular visual effects that don't fit into
the structural meanings of the various logical tags, then the physical
tags are a better way to do it than the abuse of logical tags for
meanings not intended.

--Such as <s> for incorrect code? Then why bother having logical tags
if they cannot do their job of creating a specific meaning>

Thus, if you decide to boldface all your body text just because it
looks better to you that way, use the <B>tag instead of the
<STRONG>tag since "strong emphasis" isn't the semantic connotation
here. The appearance in the mass-market browsers will be the same, but
perhaps you've saved a blind person using an audio browser from
hearing your whole document in a loud tone of voice (an appropriate
rendering for strong emphasis, but not an appropriate rendering for
the purely visual effect of boldfacing). If you want all your text in
a larger font, use <FONT SIZE="+1">instead of <H4>, since you don't
mean to imply that all your text is actually a "header".

--If someone wants his entire page bold, the connotation of importance
is lost since it is overused. Same would be true of <strong>. If you
want to make a bolded page, use CSS anyway.

TIP:Don't use <UL>to indent a block of text, or other such uses of
logical tags in illogical ways.

--Good advice, I've seen people use <blockquote> for layout. Did I
mention it was my highly esteemed C++ teacher? No wonder I hate C++ so
much. It was also he who recommened to the class we use Mozilla...
HAHA LOL :-)...

Don't misuse logical tags. Keep their actual meanings in mind, not
just their visual effects on your particular browser (which can vary
on other browsers). The meaning of <UL>is not"indent this text"; it
means "what follows is an un-numbered list," and the fact that some
browsers indent it is incidental.

--Good.

(Early versions of WebTV didn't indent <UL>lists!) By the HTML specs,
the only proper content for a <UL>list is <LI>items, so the rendering
of lists not following this syntax is undefined; a standards-compliant
browser could discard the entire contents of that section of your
document. It's poor form to rely on some browsers' behavior that runs
against the logical meaning of a tag. You'll just end up confusing any
software that actually tries to interpret the meaningof your document
instead of just its looks, and you'll have a hard time converting your
documents for new innovations like stylesheets.

--Good.

Unfortunately, those of you who use WYSIWYGeditors like Microsoft
FrontPage and Netscape Navigator Gold probably have no idea if these
programs are generating physical tags, correctly-used logical tags, or
abused logical tags. Most likely the code such an editor generates
will not be very good as a logical representation of your content,
since it is being generated in accordance with a graphical layout
rather than a logical structure. All the more reason to learn HTML
syntax and write your pages by hand in an ASCII editor!

--Another one of my teachers uses pretty <font color="orange"
size="+3"> to tell us of our quizzes and tests. Of course, she has no
idea since she uses NN Gold, since you know we have NN 4.7.

Links

David Siegel, the author of Creating Killer Web Sites, understands the
distinction between physical and logical tags, but due to his
graphical-design-oriented mindset, he advocates using the former where
I would support the latter. His is one of the best-presented
explanations of the opposing viewpoint from mine.

--The reason he is wrong is because he misses the big picture: too
many or too few logical tags, always. Though, it's nice that you
included a differing opinion.

andkonDOTcom

unread,
Jan 12, 2003, 6:33:33 PM1/12/03
to
"Jukka K. Korpela" <jkor...@cs.tut.fi> wrote in message news:<Xns9301DE57F28D...@193.229.0.31>...

> d...@tobias.name (Daniel R. Tobias) wrote:
>
> > My own take on the "physical vs. logical" issue is in my site:
> >
> > http://webtips.dan.info/logical.html
>
> The following (nice) formulation made me think that the difference
> might be subtler than we (or I) have used to think:
> "The physical tags represent specific visual effects which are intended
> to be reproduced in a precise manner, and carry no connotation as to
> their semantic meaning."
>
> I think I've seen, and I may have written, that physical markup lacks
> logical meaning. That isn't really true, or at least it's potentially
> misleading. I'm not quite happy with Dan's formulation either. Physical
> markup does not _define_ the semantic meaning (except in the trivial
> sense where we might say that the visual presentation _is_ the
> meaning), but it _may_ carry a _connotation_, at least when taken in
> context.
>

It DOES, not may. That's why the default display for <strong> is the
same as for <b>.

> For example, the effect of <b><font color="red">...</font></b> would,
> in usual visual presentations, strongly suggest some potential meanings
> to human readers. Probably a warning or something like that. But it
> does not _express_ that in a well-defined way which would make it
> possible to design different renderings for different presentations
> (including those where neither bolding nor using red color is even
> possible). - There's currently no markup for warnings in HTML, but
> using <strong> or <em>, typically with a class and some style sheet,
> will have to do.
>

Yes, there is no warning. Using <strong> only gives a general meaning
which is useless in the long-run. Either too many or too few.

> Similarly, if you use just <br> between paragraphs and
> &nbsp;&nbsp&nbsp; at the start of each paragraph, this does not
> express paragraph structure _in markup_ but it has strong
> _connotations_ when viewed under "normal" circumstances.
> And it will fail rather poorly in speech presentation - lack of audible
> paragraph structure is pretty bad.
>

The reason it's wrong to screw around with &nbsp; for formatting is
simple: it will not display the same in all situtations. You mean
aural browsers? They just dont exist whereby the blind could actually
use them.

> Physical markup is also horrendously inflexible. The "literary style"
> of paragraph presentation can be much better achieved by using <p>
> and a style sheet than using kludges like the above. There are much

Agreed that one should use <p>, but physical markup from the 5 inline
visual tags are the same ones the logical ones use.

> more alternatives to fine tuning the appearance (like the amount of
> indentation and vertical spacing, where there are imaginable
> alternatives between no spacing and one line's worth of spacing) and
> even switching to completely different presentations.
>
> To take yet another example, using <font> markup instead of <h1>, <h2>,
> etc., markup will fail not only in speech synthesis and several visual
> presentation modes but also in automated processing, e.g. when an
> indexing robot picks up words used in heading to give them more weight
> relatively or when a browser automatically constructs the list of
> headings on a page.
>

Speech browsers don't exist, it is a fantasy of the future. The block
level elements do give structure to the page which is important
otherwise, not because of useless speech browsers.

> Thus, there are basically three arguments in favor of logical markup
> instead of physical markup:
> 1. Logical markup can be mapped to varying physical presentations
> depending on presentation medium.

Hold on. If there is a complete set. There will always be problems
with the current non-complete set. And so will there be with a
complete set as well.

> 2. Logical markup can be automatically processed in a manner that
> is based on the defined logical meanings of elements.

You mean general tags that give a general meaning? Such as <cite>?

> 3. Logical markup leads to more flexible ways of affecting the
> visual presentation and creating alternative presentations.

True for block level. It isn't very flexible for inline tags as all
forms and types of citated works (and some "works") will display the
same exact way.

Don McCahill

unread,
Jan 12, 2003, 8:03:43 PM1/12/03
to

"Daniel R. Tobias" wrote:

I grumble at some of your terminology. Calling an <h1> a header rubs me
badly. It is a heading. A header is something that appears at the top of
a page. A heading can appear anywhere on a page (although it is
considered wrong when it is the last line on a page).

--
Don McCahill


Keith Bowes

unread,
Jan 12, 2003, 10:04:42 PM1/12/03
to

IIRC, only one "h1" may appear per page and it must be near the top when
used. It seems that it would be improper to use it if it's not at the top.


Jukka K. Korpela

unread,
Jan 13, 2003, 12:08:42 AM1/13/03
to
Keith Bowes <do....@spam.me> wrote:

> IIRC, only one "h1" may appear per page and it must be near the top
> when used.

I wonder what made you think that way. Such a situation is surely what
we should normally have, but where did you get those "may" and "must"
statements?

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

0 new messages