The tutorials found herein have been written for clarification of existing W3C HTML 4.01 (and, by extension, XHTML 1.0 as text/html) documentation and use real-world examples. W3C HTML 5 (Draft) clarification and examples are included.

Sections of elements are below. The attributes, too. Some section names have been taken from HTML 5; some remain HTML 4.01. Text-Level Elements - in HTML 5 - have become Text-Level Semantics but some were reclassified as Grouping or Phrasing Content; List elements are Grouping Content.
class
The class attribute assigns a single name or set of class names to an element. Any number of elements may be assigned the same class name or names.
class attribute has several rôles in HTML:classClass attributes may be used in multiple instances on a page.
<h3 id="plynth" class="oblique"><code>Class</code> attributes may be used in multiple instances on a page.</h3>
.oblique { font-style: oblique; }
Futuristic Retrofitting on scale not seen since Archimedes took his Eureka! bath
<h3 class="largeText lacksLeddingBottom"><abbr>HTML</abbr> 5 Hocus Pocus</h3>
<p class="lacksLeddingTop note">Futuristic Retrofitting on scale not seen since Archimedes took his Eureka! bath</p>
.largeText { color: #666; font: 1.8em Times, Palatino, serif; }
.lacksLeddingBottom { margin-bottom: 0; padding-bottom: 0; }
.lacksLeddingTop { margin-top: 0; padding-top: 0; }
.note { font-size: .8em; }
This page uses class="note" in eight (8) instances. And, class="elementSignificance" in four (4) instances; dl class="elementExample" and dt class="exampleName" are used in three (3) instances.
The class attribute is used on elements where repeating style selectors or script references in a document are required. Examples:
div containers are identified by a single class name.dl containers are identified by a single class name.h3) separating content are identified by a single class name.However, there is a more beneficial use of the class attribute: typography. Multiple style declarations are used individually for greater control in styling elements. The Third Example above uses this method; this method is well suited for any site that requires numerous typography settings (which may be changed at any time) in larger sites. This means that instead of writing one single selector for all possible variant typography, multiple - individual - selectors may be used in the class attribute.
.firstHeadingUsedBeneathBannerImage { color: #778899; font: bold oblique 4em/2.8 "Times New Roman", Alcoholica, serif; text-transform: uppercase; text-indent: 20px; background-color: #000; }.c778899 { color: #778899; }.fontWeight { font: bold; }.oblique { text-style: oblique; }.fontSize4EM { font-size: 4em; }.lineHeight2_8 { line-height: 2.8; }.sectionHeadingFont { font-family: "Times New Roman", Alcoholica, serif; }.uppercase { text-transform: uppercase; }.specialIndent { text-indent: 20px; }.background_000 { background-color: #000; }names, classes, and IDs, are written so that the first character is a letter [ a-z and A-Z ] or hyphen [ - ] or underscore [ _ ] but cannot start with a digit [ 0-9 ], or a hyphen followed by a digit (e.g, -9).The Elementary Standards: A Compendium of articles, tutorials and reference material regarding Web Standards, HTML and CSS Copyright ©2005-2010. All work is published by Sean Fraser under a Creative Commons License. All Rights Reserved.