Authoring Great Documents

Aaron Gustafson & Molly E. Holzschlag

Cronin and Company and Molly.com

A great document…

  1. is well-organized/follows a logical outline
  2. downloads quickly
  3. works on multiple devices
  4. looks good when printed
  5. is accessible and usable by everyone
  6. explains unfamiliar words or concepts

XHTML Basics

XHTML vs. HTML

HTML 4.0 vs. XHTML 1.0
Criterion HTML 4.0 XHTML 1.0
Is an XML No Yes
Requires element termination Limited Yes
Requires lower case tags No Yes
Requires quoted attribute values Recommended Yes
Nesting rules apply (well-formedness) Yes Yes
Requires special character encoding Yes Yes

XHTML skeleton (XHTML 1.0 Strict)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
 "http://www.w3.org/TR/XHTML1/DTD/XHTML1-strict.dtd">
<html xmlns="http://www.w3.org/1999/XHTML"
 xml:lang="en" lang="en">
<head>
  <title>Page Title</title>
  <meta http-equiv="content-type"
   content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Language" content="en-us" />
</head>
<body>
  <!-- page content goes here -->
</body>
</html>

Semantics: meaning beyond presentation

Semantics in Practice: ids

Semantics in Practice: Page Divisions

Semantics in Practice: Page Divisions

Dividing a page:

A screenshot of the new WOW homepage A screenshot of the new WOW homepage with divisions marked in red

Semantics in Practice: Page Divisions

The code:

…
<body>
  <div id="header">
    <!-- main navigation & such -->
  </div>
  <div id="content">
    <!-- main content -->
  </div>
  <div id="upFront">
    <!-- bubbled up content -->
  </div>
  <div id="footer">
    <!-- copyright & footer navigation -->
  </div>
</body>
…

Semantics in Practice: Page Divisions

Further divisions:

A screenshot of the new WOW homepage with divisions marked in red and subdivisions marked in green

Semantics in Practice: Page Divisions

The code:

…
  <div id="content">
    <div id="mainBlock">
      <!-- focal information about WOW -->
    </div>
    <div class="sectionBlock">
      <!-- community links -->
    </div>
    <div class="sectionBlock">
      <!-- education links -->
    </div>
    <div class="sectionBlock">
      <!-- certification links -->
    </div>
  </div>
…

Semantics in Practice: Page Divisions

The code:

…
  <div id="upFront">
    <div>
      <!-- quick links -->
    </div>
    <div>
      <!-- WOW highlights -->
    </div>
  </div>
…

Semantics in Practice: Organization

Semantics in Practice: Organization

Semantics in Practice: Organization

Semantics in Practice: Text

Semantics in Practice: Text

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Semantics in Practice: Forms

Usability & Accessibility

alt, longdesc & title

accesskey & tabindex

accesskey & tabindex

lang & cite

Exploring the “X” in XHTML

Customization Example

Customization Example: required

Customization Example: validatefor

Customization Example: match

Customization Example: The Form

Customization Example: JavaScript Step 1

Customization Example: JavaScript Step 2

Customization Example: Working Example

In Summation…

Resources & More Reading