Information Technology Reference
In-Depth Information
6
If you didn't want the extra blank space, you used the <br> , or break , tag instead, to force a line
break. However, if you wanted more space, you were stuck. Most browsers are programmed so
that, if you use multiple <p> tags, multiple <br> tags, or a mix of both, the “extra” tags are
ignored. You can't get the extra spacing conveniently with HTML.
Over time, the paragraph tag has often been used as a container tag, with a <p> tag at the begin-
ning of a paragraph and </p> at the end. This is a more purist approach, in that the beginning and
ending tags denote, “this is a paragraph unit,” whereas <p> by itself meant, “put a paragraph
break here!”
In CSS, it's more common to use the <div> tag to indicate a division, the exact nature of which is
defined in a style sheet. This is powerful but obscure, as you have to look in the style sheet file to
understand what the <div> tag will do. And because one style sheet can override another—that's
why they're called Cascading Style Sheets—you might have to look in many files to figure out
what's going on.
WordPress hides tags such as <div> from you in HTML mode; it must be that it's confusing enough
without them!
Now that you see how hard it is to get HTML to give you a break, you can understand the frustra-
tions web designers have suffered for years. It's common for web designers to relate how frustra-
tions with HTML, CSS, and various browsers have led them to break down in tears.
List Formatting
It's good to understand the list formatting in WordPress because lists are very convenient (for you
and your readers), but also a frequent source of frustration with HTML. Browsers tend to display
lists in ugly ways—with a wedge of blank space in front of the first list item and no spacing at all
between items.
It's quite common for HTML maestros to use all sorts of tricks to make lists come out better and for
CSS experts to use CSS, in an approved way, to get excellent results.
HTML implements lists by specifying the type of list up front, then surrounding each line in the list
with tags to show it's a list item. This makes it easy to switch between the two types of lists that
HTML supports:
Unordered list Unordered means “it doesn't matter what order is used,” but HTML always dis-
plays the items in the order you provide them. Unordered lists always show up as bulleted lists.
However, calling them unordered instead of bulleted is part of the preference in HTML for speci-
fying meaning, not specific formatting details.
Ordered list Ordered means “the order is important,” and browsers always display ordered
lists as numbered lists.
The group of items in unordered (bulleted) lists are surrounded by the <ul>/</ul> tab pair. Each
list item is preceded and followed by the <li>/</li> tag pair, with li standing for list item .
Search WWH ::




Custom Search