Instructional Module X13c.htm

Document Structure, Content, and Presentation


to Top Overview

In Module X01c, the vision of the Semantic Web was introduced. In order to bring this vision to reality, one step Web designers must take is to separate content and structure from presentation. In this module, we'll look at details of some of structure, content, and presentation.


to Top What is Structure?
Logic Structures

to Top
Link to Top

There are two kinds of structure that concern Web design:

  1. Logic structure
  2. Syntactic structure

Logic structure is the underlying organization of the information. Logic structure is often expressed in outlines.

A good designer will create a logical structure for a document first, then consider the syntactic options for expressing that logic structure.

Syntactic Structures

to Top
Link to Top

Syntactic structures are the units of code+information in a Web page. For example, we can code structures such as paragraphs, lists, and tables for our pages.

Since the purpose of a Web page is to display information clearly and attractively, the logic structure is the first type of structure to consider. Designers need to be creative in using syntactic structures, but not get blinded by the code and coding process so that they forget the logic.

Block and Inline Structures

to Top

Link to Top

The syntactic structures of XHTML are of two types: block and inline. It's important to know the difference, because you can't put block elements inside inline elements. Notice that:

  • Block elements can all contain Inline elements; many can contain other block elements.
  • Inline elements can only contain text or other Inline elements.
Block Structures

This table shows the elements defined as Block Structures in the formal XHTML documentation.

Element Purpose Possible Contents
address Snail-mail address Text | Inline
blockquote Extended quotation Text | Inline | Heading | Block | List
div Generic block element Text | Flow
h,h1,h2,h3,h4,h5,h6 Document headings Text | Inline
hr Horizontal rule EMPTY
p Paragraph Text | Inline | List | blockcode | blockquote | pre | table
pre Preformatted plain text Text | Inline
section Generalized section Text | Flow

Notes:

  • Click any element name to see its official definition.
  • The symbol "|" is used to mean "or".
  • "Text" is an intentional simplification of the formal PCDATA specification.
  • "Inline" means this element can contain any Inline element
  • Other terms, such as Heading and List, represent types of block elements that can be included.
Inline Structures

And here are the elements defined as Inline Structures:

Element Purpose Possible Contents
abbr Abbreviation Text | Inline
cite Citation of a reference source Text | Inline
code Computer code Text | Inline
dfn Word or phrase being defined Text | Inline
em Text to be presented with greater emphasis, usually in italics Text | Inline
kbd Text to be entered by the user Text | Inline
line Text to appear on a line by itself Text | Inline
quote In-line quote Text | Inline
samp Sample output from programs Text | Inline
span Generic in-line element Text | Inline
strong Text to be presented with greater strength (usually boldface type) Text | Inline
sub Subscript (HTML only; not defined in XHTML) Text | Inline
sup Superscript (HTML only; not defined in XHTML) Text | Inline
var A program variable name Text | Inline

 
to Top What is Content?
Data: Role and Information

to Top
Link to Top

Data in computers is of two types:

  1. Information
  2. Role, or "metadata"

Information is the "payload". It's what you want to get out of the computer or network. This is what we call the content of a Website.

Metadata is data about information. Its purpose is to clarify what the information is about.

For example, if you want to know someone's address, the information content is
      1234 Main St.
      Anytown
      MH
      12345

The metadata, or role, of each piece of information is
      Street
      City
      State
      Zipcode

In normal human conversation, we often get the information without its role, and supply the metadata from the context and from our experience. Since machines can't do that, we have to supply the metadata to enable software agents to understand what they're finding and use it in helpful ways.

The main purpose of RDF is to enable machine-readable metadata.

Text, Objects, and References

to Top
Link to Top

Information comes to us in many forms. On the Web, there are three main forms of content:

  1. Text: plain writing
  2. References: the hyperlinks to other information
  3. Objects: graphics, images, applets, and many kinds of files for which plugins are required
 
to Top What is Presentation?
Medium and Format

to Top
Link to Top

When we talk about presentation, we're actually including two aspects of how information is brought to a human:

  • Medium: the type of device through which the information comes.
  • Format: the details of how content will be presented.
Types of Media

to Top
Link to Top

With the Web, normal computers (desktops and laptops) with color screens are the default medium.

Cell phone displaying W3C-compliant Web page

Many other media exist, including PDAs and cell phones. Their popularity is making them very interesting to information providers. The ability to present Web pages on large and small screens, and even over a voice telephone, is one of the main reasons we need to separate content from presentation.

However, the primary medium for delivery of Web pages is still the normal computers.

Types of Format

to Top
Link to Top

Format includes features such as fonts and colors.

If the medium is voice, it would include relative pitch and loudness.

 


to Top About This Document
For Further Information W3C Technical Architecture Group working paper on document structure, "Separation of semantic and presentational markup, to the extent possible, is architecturally sound": http://www.w3.org/2001/tag/doc/contentPresentation-26.html
Review Button

Click here for review questions.

Audience

to Top
Link to Top

This module is for people who know the basics of writing XHTML code, and need to learn how to differentiate structure from content and format.

Objectives

On successful completion of this module, you will be able to:

  1. Identify the difference between block-level and inline elements
  2. Identify the visual differences between paragraphs, divs and spans
  3. Structure content using block-level elements
Link to Top
Module X13c.htm: Document Structure, Content, and Presentation
This document is part of a modular instruction series in Computer Instruction. For more information, see the overview or the list of modules in this series, X: XML, XHTML, DHTML, CSS. This document has been used in the following classes: INP 150.
History
Original: 19 September 2003, by Laurence J. Krieg
Last modification: Monday, 31-Aug-2009 11:48:07 EDT
Copyright
Copyright © 2003, Laurence J. Krieg, Washtenaw Community College
Instructors: You may point to this file in your Web-based materials; however, its location may change without notice.
Students: You are welcome to make a copy for your personal use.
All other uses: Please contact the author, Laurence J. Krieg, for permission: krieg@ieee.org.

Link to Top