Information Technology Reference
In-Depth Information
II
Table 6.2
Visual Versus HTML Text
Visual
HTML
How
are
you
?
<em>How</em> are <strong>you</strong>?
Where
are
you
?
<em>Where</em> are <strong>you</strong>?
What
are
you
doing?
<em>What</em> are <strong>you</strong> doing?
Why
are
you
so late?
<em>Why</em> are <strong>you</strong>
<span style=”text-decoration:
line-through;”>so</span> late?
Strikethrough is implemented using CSS via the
<span>
and
</span>
tag pair. These tags are like a
red flag to let you know that classic, basic HTML is being left behind. They mean something like
this: “The span of text between these tags has shared characteristics,” which are then defined
within the opening tag. In this case, the
style
attribute defines formatting, called
text-
decoration
, which is
line-through
to produce the strikethrough effect. It's understandable
that WordPress uses CSS for this; the strikethrough effect is implemented in HTML as
<s>
,
<st>
, or
<del>
(for
delete
) in various versions of HTML.
Still, the pure version is much harder to read. If you get some experience working with HTML, you
learn to ignore the HTML tags when you want to read the underlying text. It's much harder to
ignore
<strong>
when you're scanning in this way (because it's actually a word) than
<b>
. The
<em>
tag is both reminiscent of Auntie Em in the
Wizard of Oz
, or an em dash if you work with
typography, and easy to confuse with
<strong>
.
Here's the same text with the more commonly used tags, so you can see how much clearer a less
pure version of HTML is to read:
<i>How</i> are <b>you</b>?
<i>Where</i> are <b>you</b>?
<i>What</i> are <b>you</b> doing?
<i>Why</i> are <b>you</b> <st>so</st> late?
WordPress will accept the more commonly used, and easily understood, tags, such as
<b>
and
<i>
,
if you type them into the HTML tab, or copy them in from a tool that uses them.
If you look at the result on the Visual tab, then return to the HTML tab, the tags will be changed to
<strong>
and
<em>
. Less widely supported tags, such as
<st>
, are simply dropped; you'll have to
notice they're missing and reenter them in a WordPress-approved form on the HTML tab, or by
using the buttons on the Visual tab.
The Mysterious
<p>
Tag
The paragraph, or
<p>
, tag is one of the greatest sources of frustration in HTML editing.
The
<p>
tag was originally used to indicate formatting, not meaning; you dropped one in when you
wanted to end one paragraph and start another one.
Most web browsers display some blank space at the start of the next paragraph. It's common for
web page designers to often want either no extra space or a lot of extra space.