It's a challenge for some browsers to deal with other HTML content within a table cell. Here's a quick test of most of the HTML elements in the context of a table, of course not including head material.
|A (Anchor)||12.2||7.5.6 Address, to another page
Anchor (comefrom), from the last row
|DIV||7.5.4||According to an example in the HTML 4.0 specification, section 7.5.4, a DIV may contain a table. The concept of hierarchical organization is not well developed in this specification, but that sort of implies that a table may not contain a DIV. Hence DIV is not tested.|
|SPAN||7.5.4||Demo of SPAN. This sentence, covered by a SPAN, should be red. And the cell content returns to the default color.|
Heading Type H1
Heading Type H2
Heading Type H3
Heading Type H4
Heading Type H5
Heading Type H6
Arnaud Le Hors,
contact persons for the W3C HTML Activity|
$Date: 1998-04-02 00:20:03$
|EM||9.2.1||EM for emphasis.|
|STRONG||9.2.1||STRONG for stronger emphasis.|
|DFN||9.2.1||Dfn (DFN) for a word that is being defined here.|
|SAMP||9.2.1||SAMP for sample output of a program.|
|KBD||9.2.1||KBD for text to be entered by the user.|
|VAR||9.2.1||Var (VAR) for a variable name.|
|CITE||9.2.1||CITE for a literature citation.|
|ABBR||9.2.1||ABBR for an abbreviation.|
|ACRONYM||9.2.1||ACRONYM for an acronym.|
|Q (Quote)||9.2.2||Quotation: |
She yawns widely, showing four tiny Smilodon fangs.The browser should provide quote marks around it.
|BLOCKQUOTE||9.2.2||This text precedes the blockquote, which typically has indented
left and right margins and no quote marks. Here's the quote:
And I bend double, hands and feet on the ground just like Lutra lutra, the Terran river otter. With my hand I sweep two large chunks of rock over the edge and I walk out on the narrow shelf.
|SUP||9.2.3||r2 (r squared)|
|SUB||9.2.3||gij (g subscript i and j)|
|P||9.3.1||Usually a table cell contains a number or a word, or at most a short
phrase. However, a cell could contain several paragraphs. This
paragraphbegins immediately after the <TD> tag without any <P>, but here's another paragraph to follow it.
This paragraph is spaced, aligned and justified in the default style for the browser. It's padded out with enough words to ensure that it wraps into multiple lines.
This paragraph is aligned left using the ALIGN=LEFT attribute. It's padded out with enough words to ensure that it wraps into multiple lines.
This paragraph is aligned right using the ALIGN=RIGHT attribute. It's padded out with enough words to ensure that it wraps into multiple lines.
This paragraph is centered using the ALIGN=CENTER attribute. It's padded out with enough words to ensure that it wraps into multiple lines.
This paragraph is justified (if the browser can do that) using the ALIGN=JUSTIFY attribute. It's padded out with enough words to ensure that it wraps into multiple lines.
|BR||9.3.2||Line breaks can be*|
inserted at arbitrary places in the text using the BR tag (there's one at the asterisk).
This paragraph is marked with DEL.
So is this one.
|DL, DT, DD||10.3|
|MAP, AREA||13.6||(Not tested)|
|TT||15.2.1||TT for monospace (typewriter) font.|
|I (italic)||15.2.1||<I> for italic font.|
|B (bold)||15.2.1||B for bold font.|
|BIG||15.2.1||BIG for a bigger font than the default.|
|SMALL||15.2.1||SMALL for a smaller font than the default.|
|U (underline)||15.2.1||U for underlined text (deprecated).|
|These four items are done with style effects and include a patch of italic text in the middle.|
|Upper Case||15.2.1||This Sentence Has A Style Effect Making It All Upper Case.|
|Lower Case||15.2.1||This Sentence Has A Style Effect Making It All Lower Case.|
|Capitalize||15.2.1||this sentence has a style effect capitalizing each word, where the original had no capitals.|
|Small Caps||15.2.1||This Sentence Has A Style Effect Setting It In A Small Capital Font.|
|FONT||15.2.2||Cursive: The quick brown fox jumped over the lazy dog's back. 0123456789.|
|HR||15.2.3||The rule below should span just this cell. There's another demo
with the paragraph-related tags.|
|IFRAME||16.5||The iframe has a width of 150px, height 130px, and an external margin
of 20px all around.|
|A (Anchor)||12.2||Go to the first row|
The following HTML elements may be too wide for the prespecified column widths in the table, presenting the browser with a dilemma: to obey the column width and wrap the content contrary to its nature, or to obey the content and expand the column beyond the user-specified value.
|PRE||9.3.4||Here's the poem from the HTML 4.0 standard:
Higher still and higher From the earth thou springest Like a cloud of fire; The blue deep thou wingest, And singing still dost soar, and soaring ever singest.
To a Skylark.
The related deprecated LISTING and XMP tags are not tested.
|; ||9.3.2||The nonbreak space has an entity code of . The browser should either wrap in the middle of a word or should make the sentences hang off the right edge of the window, possibly with scrollbars (how's that for about 180 bytes of run-on sentence, eh?)|
|;­||9.3.2||Soft hyphens introduce line break opportunities within words. Sesquipedalian 4H-1,3-dioxolo[4,5-d]imidazole antidisestablishmentarianism 7H-pirazino[2,3-c]carbazole silicovolcanopneumoconiosis 7H-indolo[3,2-f]quinoxaline.|