Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: AN HTML BUG?



Ludwik Kowalski wrote:

What is wrong with expecting the plain text (in the
<h3> style) to resume after the </B> in line 5?

The key correct concept is RESUME.
The key incorrect concept is PLAIN TEXT.

The </b> directive does !!not!! mean to unbold the text.
It means to terminate the <b> directive and RESUME whatever
mode was previously prevailing. In this case the previous
mode was set by the <h3> directive, so that's what will be
RESUMED, and since <h3> is already bold (typically), neither
the <b> nor the </b> changes the appearance.

==============

In the language of computer science, the modes are kept
on a pushdown stack. A directive such as <b> pushes a
new mode; a directive such as </b> pops back to the
previous mode.

Every opening directive <whatever> should be paired with the
corresponding closing directive </whatever>. When debugging
HTML, this is the first thing to look for. This is a syntactic
check; you don't even need to know the semantics of the directive.

There are some directives such as <p> for which you can get away
without the closing </p> but there aren't very many, and it's
analogous to jaywalking -- technically illegal even if you can
get away with it.

Use the free online validator:
http://validator.w3.org/