Information Technology Reference
In-Depth Information
II
HTML Tags
The basics of HTML can be unraveled by looking closely at its name: Hypertext Markup Language.
A markup language is a set of codes inserted within a flow of text that describe how the text
should be formatted, or that give other instructions. A markup instruction in HTML is called a tag .
A typical tag looks like this: <b> . The angle brackets indicate that the text inside them isn't to be
displayed—instead, it's an instruction.
Many tags come as beginning and ending tags, like this:
The last word in this sentence is displayed in <b>bold</b>.
That's how the text would look on the HTML tab. On the
Visual tab, or in your blog after you publish, the same sen-
tence would appear like this:
The last word in this sentence is displayed in bold .
So in HTML, you format a word as bold by surrounding it
with the beginning bold tag, <b> , and the ending bold tag,
</b> . Similarly, you use the <i> and </i> tags around words
or characters that you want to display in italic.
HTML was developed in accordance with a strong set of
ideals, alongside strong practical concerns, which sometimes
conflicted.
For instance, HTML is meant to convey meaning , not format-
ting . The bold and italic tags are formatting tags. They're
tremendously popular because each “does what it says on
the tin,” across a wide range of devices to boot.
The meaning behind the styles might be different from their look.
An HTML purist would prefer to use tags that specify the
meaning rather than the formatting. So, to follow along with the
theory behind HTML, you should use <em> to emphasize text and
<strong> to make it appear strongly. What this means in prac-
tice is that HTML purists use <em> for italic and <strong> for
bold, along with the corresponding ending tags, even though the
pure tags are much harder to remember and take longer to type.
CSS is meant to be a triumph of the purist approach because it
separates meaning from the specifics of how something appears.
In practice, CSS just gives you the tools to spend far more time
working on the details of appearance, often well beyond the
importance of the underlying text.
So that's the markup language part of HTML. Figure 6.1 shows
the HTML source code underlying a post on gvDaily.com. To com-
plete our look at the words behind the acronym HTML, let's look
at the HT, or Hypertext, part.
note
We're not just introducing these
HTML specifics for fun, or your gen-
eral education; they're needed for
you to understand why WordPress
handles HTML the way it does,
which would otherwise seem con-
fusing. We've simplified years of
history and acres of onscreen and
in-person exchanges among com-
peting opinions to the bare bones
that affect how you write HTML
code for WordPress.
tip
You can see HTML in action on
any web page. Almost any web
browser has a command that
displays the underlying
HTML-tagged text. In Internet
Explorer, the command is on the
View menu, and is called Source;
other browsers use the same or
similar wording. The View
Source command causes the
HTML, CSS, and other code
underlying the web page to
display.
Search WWH ::




Custom Search