HTML and CSS Reference
In-Depth Information
To some extent this is really the problem of the people who make screen-reading software, and you as a
developer are still allowed to push the envelope until they catch up. Unfortunately, it's the users who suffer
in the interim. To improve accessibility for your web pages, you may prefer to follow a standard hierarchy
and choose headings that match their section's nesting level.
If this wasn't quite dense enough for you and you'd like to read a technical breakdown of
Meaningful Portions
Now that you're familiar with some of the elements you'll use to divide your content into general sections
and arrange them in a clear order, it's time to delve into those sections and break that content down further
into manageable, readable portions.
As you probably learned in grammar school, a paragraph is one or more sentences expressing a single
thought or idea, or about one aspect of a topic. It's the standard unit of written prose. A <p> start tag marks
the beginning of a paragraph, and a </p> end tag marks its end, though the end tag is optional if the
element immediately following a paragraph is another paragraph, a heading, a list, a table, a form or
fieldset, any element that is sectioning content, or any of a few other elements (we won't list them all here).
Even though it's perfectly valid in HTML5 to omit the end tag under some circumstances, it's still a good
idea to include it. Should you add some other element after a paragraph in a future update, you could
easily introduce validation errors or other problems (unless you remember to end the paragraph when you
add the new element, of course). Always be considerate and cautious whenever you choose to omit end
tags. If in doubt, close your elements.
Listing 4-11 shows two paragraphs in HTML, and we've closed them both with end tags. Blank lines
between elements aren't necessary, but they can help make your markup more readable as you work.
Paragraphs are flow content, and can only contain phrasing and interactive content.
Listing 4-11. Two paragraphs in HTML
<p> Power Outfitters offers top of the line merchandise at rock-bottom
prices for the discerning costumed crime-fighter. From belts to boomerangs,
we're your one-stop shop for all your specialized gadgetry and costuming
needs. </p>
<p> Come browse our wide selection of capes, cowls, masks, boots, belts,
gloves, tights, unitards, and leotards in all the colors of the rainbow.
Our clothiers are on call 24 hours a day, always ready in a pinch to
replace a singed cloak or patch a ripped tunic, because we know crime
doesn't sleep and justice can never rest. </p>
Search WWH ::

Custom Search