MAMA: BODY structure

By Brian Wilson

Index:

  1. Introduction
  2. BODY element and attributes
  3. Common and proprietary attributes

Introduction

BODY ranks as the 4th most popular element overall. Most people would expect this near-ubiquity, but the opening and closing tags for the BODY element are actually optional. A natural result of relaxed specification requirements is decreased usage, and it is interesting to see the way HTML evolved—some other elements such as LI and P also have closing tags that were optional, and many authors omit closers for them. However, the BODY element has always been treated with a bit more sanctity than the other elements with optional components. Every generic HTML authoring template will include the BODY, and every beginner's class in HTML will admonish its students if they forget to include a BODY element.

BODY element and attributes

Of the URLs that had a BODY element, 799,002 of them (23.14%) did not use any attributes. In the remaining group, two-thirds of the URLs used the Bgcolor attribute.

Marginheight and Marginwidth are attributes that share a similar purpose and will often be used together. The same can also be said of the Link/Text/Vlink/Alink attributes. This explains the proximities of the attributes in the frequency tables. Strangely, this even holds true for totally invalid attributes such as Vspace and Hspace, which have almost identical usage numbers—they are used 4,215 and 4,214 times respectively, and 4,107 of those times are in the same document.

We can compare the overall attribute frequency results to Hickson's Google research and find a high correlation—except for an odd switch. In Hickson's URL set research, the margin appearance attributes (Marginheight/Marginwidth) both have higher frequency than the text and link color appearance attributes (Link/Text/Vlink/Alink). In MAMA's research, the relative popularity of these two groups is reversed; there doesn't seem to be any obvious explanation for the swap.

Fig 2-1: BODY element/attribute frequency
ELEMENT/AttributeFrequency  ELEMENT/AttributeFrequency ELEMENT/AttributeFrequency
BODY3,452,907   Alink 700,028   Align5,478
   Bgcolor1,769,135   Background 634,617   Border4,884
   Topmargin1,111,967   Rightmargin 177,579   Vspace4,215
   Leftmargin1,055,657   Bottommargin 137,443   Hspace4,214
   Link923,425   Bgproperties 51,550   Width4,111
   Vlink903,271   Scroll 27,026   Nosave3,451
   Text840,383   Nof 21,835   Height2,639
   Marginheight823,090   Ms_positioning 9,499   Marginleft2,292
   Marginwidth816,162   Stylesrc 6,707   Margin2,119

Common and proprietary attributes

The attribute list for the BODY element above (Fig 2-1) does not include many of the attributes that Hickson's study did, namely all of the generic attributes (Style, Class, Id, Lang and event handlers); those are discussed in other sections. Other semi-popular attributes find a place in this usage list, even though they are not valid by any of the popular markup standards. Attributes such as Ms_positioning and Scroll are MSIE-only browser extensions, while others are created by Web page editors as part of their creation process (such as Nof from Netobjects Fusion and Stylesrc from Microsoft FrontPage).

This article is licensed under a Creative Commons Attribution, Non Commercial - Share Alike 2.5 license.

Comments

The forum archive of this article is still available on My Opera.

No new comments accepted.