Sample XHTML Basic 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

Text

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

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.

Paragraphs: p

This is paragraph.

Forcing a line break: br

Line
break

Preformatted text: pre

    This is
        preformatted
    text.
    

Lists

Unordered lists: ul

  • "Inline" list item
  • "Block" list item

Ordered lists: ol

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

Definition lists: dl

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

Tables

Caption
Inline content in th

Block content in th

Inline content in td

Block content in td

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

Forms

Input fields

Text input

Password input

Checkboxes

Radio buttons

Submit/Reset

Option selector

Textarea

Masayasu Ishikawa