Home

HTML Elements

by Kenneth Tibbetts

HTML Basics

A div is a block level element that can contain any number of any sort of element. (<div>)


A span is an inline element that can contain any number of inline elements. (<span>)

line break (<br >):

horizontal line (<hr >):

A paragraph element. (<p>)
Paragraphs, like headings and other blocks,
contain text nodes, line breaks,
and inline elements

A blockquote element. (<blockquote>)
In use, this should be
a long quote or citation,
though it can contain most of the other elements.
An address is a block level element. (<address>)
mailto: links are common in address elements.
	A pre element is block level and can contain inline content,
	but it is best to use it for displaying
	wh  it  e-     spa  ce and 	
	line 
	break 
	preserved text.
	
(<pre>)

Headings

heading 1 (<h1>)

heading 2 (<h2>)

heading 3 (<h3>)

heading 4 (<h4>)

heading 5 (<h5>)
heading 6 (<h6>)

Lists

li and dd elements can contain most any elements, but that doesn't necessarily mean they should...

Ordered list (<ol>)

  1. Ordered list item (<li>)
  2. list item
  3. list item
  4. list item
  5. list item

Unordered list (<ul>):

Definition List (<dl>)

term (<dt>)
Definition (<dd>)
term
Definition

Phrase elements (Inline):

These elements contain text nodes

An em element in a paragraph. (<em>)

A strong element in a paragraph. (<strong>)

A wordsub element in a paragraph. (<sub>)

A wordsup element in a paragraph. (<sup>)

An abbr element (eg, USA) in a paragraph. (<abbr>)

An acronym element (eg, NATO) in a paragraph. (<acronym>)

A kbd element in a paragraph. (<kbd>)

A samp element in a paragraph. (<samp>)

A code element in a paragraph. (<code>)

A var element in a paragraph. (<var>)

A quote element in a paragraph. (<q>)
(There are no quotation marks in the source, or displayed by IE6.)


Hypertext

A hyperlink is an a element with a valid 'href' attribute (<a>)

An anchor just needs an id- (<a>)

Any element with an id can be the target of a link

alternate text
An image (<img/>)


An iframe (<iframe>)is in the cascade, but the document inside the iframe has its own css heirarchy.

The (<object>) Element

The object element can be used for images, remote html, and other media or programable data. (<object>)


Form <form>

Forms page


Table <table>

Structural groups of table elements:

table caption (<caption>)
table header cell (<th>) in (<thead>) table header cell table header cell
table footer cell(<th>)> in (<tfoot>) table footer cell table footer cell
1. table header cell (<th>) in (<tr>) table cell (td in tr) table cell
2. table header cell (th in tr) table cell (td in tr) table cell
3. table header cell (th in tr) table cell (td in tr) table cell
4. table header cell (th in tr) mrshoo@someweb.com table cell (td in tr) table cell
5. table header cell (th in tr) table cell (td in tr) table cell