The document-v1.2 DTD This document doesn't make any sense at all. A nonsense document using all possible elements in the current document-v12.dtd.
Sample Content

This is a simple paragraph. Most documents contain a fair amount of paragraphs. Paragraphs are called <p>.

With the <p xml:space="preserve"> attribute, you can declare that whitespace should be preserved, without implying it is in any other way special.

A number of in-line elements are available in the DTD, we will show them inside an unordered list (<ul>):

So far for the in-line elements, let's look at some paragraph-level elements.

The <fixme> element is used for stuff which still needs work. Mind the author attribute! Use the <note> element to draw attention to something, e.g. ...The <code> element is used when the author can't express himself clearly using normal sentences ;-) Sleep deprivation can be the result of being involved in an open source project. (a.k.a. the <warning> element).

Apart from unordered lists, we have ordered lists too, of course.

  1. Item 1
  2. Item 2
  3. This should be 3 if my math is still OK.
Using sections

You can use sections to put some structure in your document. For some strange historical reason, the section title is an attribute of the <section> element.

Sections, the sequel

Just some second section.

Section 2.1

Which contains a subsection (2.1).

Showing preformatted source code

Enough about these sections. Let's have a look at more interesting elements, <source> for instance:

// This example is from the book _Java in a Nutshell_ by David Flanagan. // Written by David Flanagan. Copyright (c) 1996 O'Reilly & Associates. // You may study, use, modify, and distribute this example for any purpose. // This example is provided WITHOUT WARRANTY either expressed or implied. import java.applet.*; // Don't forget these import statements! import java.awt.*; public class FirstApplet extends Applet { // This method displays the applet. // The Graphics class is how you do all drawing in Java. public void paint(Graphics g) { g.drawString("Hello World", 25, 50); } }

Please take care to still use a sensible line-length within your source elements.

Using tables

And now for a table:

Table caption
heading cell heading cell
data cell data cell

Not much of attributes with <table>, if you ask me.

Using figures

And a figure to end all of this.

Changes since <link href="site:document-v11">document-v11</link>

doc-v12 enhances doc-v11 by relaxing various restrictions that were found to be unnecessary.