Sample XHTML 1.0 document

Contents

Grouping elements: div and span

div
span

Headings: h1, h2, h3, h4, h5, h6

h1

h2

h3

h4

h5
h6

Address: address

Address

Bidirectionality

Base directionality: left to right

Arabic text: غرب

Base directionality: right to left

Arabic text: غرب

Bidirectionality override: bdo

left to right: 1234567890

right to left: 1234567890

Text

Phrase elements: em, strong, dfn, code, samp, kbd, var, cite, abbr, and acronym

Font style elements: tt, i, b, big, and small

Quotations: blockquote and q

An example of quotation:

John said, I saw Lucy at lunch, she told me Mary wants you to get some ice cream on your way home. I think I will get some at Ben and Jerry's, on Gloucester Road.

Subscripts and superscripts: sub and sup

This is subscript, and this is superscript.

Paragraphs: p

This is paragraph.

Forcing a line break: br

Line
break

Preformatted text: pre

    This is
        preformatted
    text.
    

Marking document changes: ins and del

ins and del

Inserted paragraph

Deleted paragraph

Some words were inserted, but later whole paragraph was deleted

Rules: hr


Lists

Unordered lists: ul

Ordered lists: ol

  1. "Inline" list item
  2. "Block" list item

Definition lists: dl

Definition term
"Inline" definition description
"Block" definition description

Tables

Using column and row groups: colgroup, col, thead, tfoot, and tbody

Caption
Inline content in th in thead

Block content in th in thead

Inline content in td in thead

Block content in td in thead

Inline content in th in tfoot

Block content in th in tfoot

Inline content in td in tfoot

Block content in td in tfoot

Inline content in th in tbody

Block content in th in tbody

Inline content in td in tbody

Block content in td in tbody

Associating header information with data cells

thead.th1 thead.th2 thead.th3 thead.th4
tbody.tr1.th1 tbody.tr1.td1 tbody.tr1.td2 tbody.tr1.td3
tbody.tr2.th1 tbody.tr2.td1 tbody.tr2.td2 tbody.tr2.td3

Basic table, with categorizing cells

Travel Expense Report
Meals Hotels Transport subtotals
San Jose
25-Aug-97 37.74 112.00 45.00
26-Aug-97 27.28 112.00 45.00
subtotals 65.02 224.00 90.00 379.02
Seattle
27-Aug-97 96.25 109.00 36.00
28-Aug-97 35.00 109.00 36.00
subtotals 131.25 218.00 72.00 421.25
Totals 196.27 442.00 162.00 800.27

Anchors: a

For more information about XHTML 1.0, please consult the XHTML 1.0 Specification.

For more information about semantics of the elements and their attributes in XHTML, please consult the HTML 4 Specification.

Links to the previous section and the next section.

Body elements: div, span, h1, h2, h3, h4, h5, h6, address, bdo, em, strong, dfn, code, samp, kbd, var, cite, abbr, acronym, tt, i, b, big, small, blockquote, q, sub, sup, p, br, pre, ins, del, hr, ul, ol, li, dl, dt, dd, table, caption, colgroup, col, thead, tfoot, tbody, tr, th, td, a, img, object, map, area

Objects, Images, and Applets

Including an image: img

image

Generic inclusion: object

Image

Client-side image maps: map and area

image

image

Grouping elements: div and span Headings: h1, h2, h3, h4, h5, h6 Address: address

Server-side image maps

Server-side image maps

Forms

Input fields
Text input

Password input

Checkboxes

Radio buttons

File upload

Image submit button

Submit/Reset

Button
Option selector

Textarea

Script


Masayasu Ishikawa