Headers have been used as a means of hierarchically organizing written ideas for centuries. However, the way headers are supposed to be used¡ªboth in writing and structurally within markup¡ªis only recently coming into widespread understanding for those people working with markup.
As any reader even somewhat familiar with HTML knows, header markup consists of an ¡°h¡± followed by a numeric value, and there are six values, h1¨Ch6. These headers have a conventional visual representation in Web browsers, with h1 being bold and large and h6 being bold but quite small; this visual representation is up to the browser manufacturer to implement.
HTML specifications are not concerned with visual presentation per se. HTML and especially XHTML are concerned with structure and semantics. Instead of presentation, markup is concerned with the meaning of the elements. A header level 1, h1, isn¡¯t about being bold and large. It¡¯s about being the most significant heading on the page.
Structurally speaking, think about the text in this chapter. There¡¯s a chapter header¡ªthat would be a header level 1. Then, you have subheads, which would be header level 2, and so on. Because this book has style applied, there are specialty headers, such as the header style used for each secret. Using CSS, you can take the standard HTMLh1¨Ch6 level headers and style them with the same finesse.
Follow these tips when using headers:
- Reserve h1 headers for the most significant header on the page. It¡¯s
also recommended by many developers that you don¡¯t use more than one
h1 header. Some who argue the issue claim that it¡¯s simply more
semantically correct to only have one instance of an h1. There are also
concerns that because many search engines look at h1s for cataloguing
purposes, intentional misuse of h1s has become popular.
- Avoid ¡°widowed¡± headers. With the exception of h1, you should have at
least two subheads for each section. This is a classic concern in making
information balanced and readable and has become conventional in
print. While you can deviate from the norm, typically your content will
be more understandable when broken up into sensible sections.
- Avoid stacking headers. Always have text between headers. The purpose
of headers is to separate text into discernable sections.
- Use clear language. Writers are always wondering why their editors
are changing the titles the writer has so painstakingly crafted. I¡¯ve
come to learn that the reason is while I¡¯mtrying to be witty or clever
with my titles, I¡¯mnot telling the reader what the content is about.
Clear use of language within headers is, as with any other text,
imperative.
discuss this topic to forum
