Prev | Current Page 120 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"


In this section, we??™ll look at how to mark up paragraphs and headings, explore logical and
physical styles, and discuss the importance of well-formed semantic markup.
WORKING WITH TYPE
65
3
Paragraphs and headings
With words making up the bulk of online content, the paragraph and heading HTML elements
are of paramount importance. HTML provides six levels of headings, from h1 to h6,
with h1 being the top-level heading. The adjacent image shows how these headings, along
with a paragraph, typically appear by default in a browser.

Level one heading


Level two heading


Level three heading


Level four heading


Level five heading

Level six heading

Default paragraph size


By default, browsers put margins around paragraphs
and headings. This can vary from browser to
browser, but it can be controlled by CSS. Therefore,
there??™s no excuse for using double line breaks to
avoid default paragraph margins affecting web
page layouts.
Despite the typical default sizes, level-five and level-six headings are not intended as ???tiny
text,??? but as a way to enable you to structure your document, which is essential, as
headings help with assistive technology, enabling the visually disabled to efficiently surf
the Web.
In terms of general usage, it??™s generally recommended to stick to just one h1 element per
document, used for the page??™s primary heading. The next level down??”and the first level
in a sidebar??”would be h2, and then h3, and so on.


Pages:
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132