XHTML compatibility tests

Content: Font sizes ( 7, 6, 5, 4, 3, 2, 1 ) and style tags ( <q> ).
See also XHTML colours, my laboratory, and other XHTML links.

XHTML Font sizes

The standard modell uses 7 sizes from 1 (smallest) upto 7, the default size is 3. The header levels from <h1> downto <h6> use sizes from 7 -1 =6 for <h1> downto 7 -6 =1 for <h6> (smallest). Relative changes work from 3 -2 =1 (smallest) upto 3 +4 =7 .

The <font> tag is deprecated in transitional XHTML 1.0 and even invalid in strict XHTML 1.0. Use <big> and <small> for <font> size changes, although old browsers like OS/2 WebExplorer 1.1  may not support these tags. Generally browsers render <big> like <font size="+1"> and <small> like <font size="-1">. It's possible to nest <big> and <small> for accumulative size changes unlike <font> :

<small><big><big> has the same effect as <big> even with Lynx.

Lynx ignores <font>, but can use a different colour for <big> text. Lynx can also use different styles (e.g. colours and indentation) for different header levels <h1> downto <h6>. There should be one and only one <h1> in each document, (normally) at the top of the <body> corresponding to the <title>.

7: <h1><big>

7: <big><big><big><big>
7: <font size="+4">
7: <font size="7">

6: <h1>

6: <big><big><big>
6: <font size="+3">
6: <font size="6">

5: <h2>

5: <big><big>
5: <font size="+2">
5: <font size="5">

4: <h3>

4: <big>
4: <font size="+1">
4: <font size="4">

3: <h4>

3: <font size="+0">
3: <font size="-0">
3: <font size="3">
2: <h5>
2: <small>
2: <font size="-1">
2: <font size="2">
1: <h6>
1: <small><small>
1: <font size="-2">
1: <font size="1">
?: <h6><small>
?: <small><small><small>
?: <font size="-3">
?: <font size="0">

0 doesn't work, same effect as <h6>, <small><small>, size="-2", or size="1".

top XHTML Font styles

There are many physical and content-based style tags in XHTML 1.0, but unfortunately popular browsers don't support all tags. The new HTML 4 tags <del>, <ins>, <abbr>, <acronym>, and <q> have of course no effect in older browsers. IE  renders <kbd> as monospaced+bold, other browsers handle <kbd> like <tt>, <samp>, or <code>.
If combinations like monospaced bold don't work on a OS/2 system, select font size 11 instead of 10 for Courier.

The most infamous of these tags is <del>, because it has no effect at all in old browsers. Some "diff-marked" W3C documents using <del> hold my personal invisible with many browsers record. Please add <s> to <del> if you must use it. Even OS/2 WebExplorer 1.1  knows <s>, but neither <strike> nor <del>.

The next infamous tag is Netscape 's <blink>. It's not part of any standard and therefore not shown below. Also not shown are styles like text-decoration: overline (not supported by Netscape 4.61 ) and text-decoration: underline. You can use <u> for underlined text, but note that <u> and <s> are deprecated in transitional XHTML 1.0 and invalid in strict XHTML 1.0.

WebExplorer  doesn't support <sup> and <sub>, but can handle nested physical style tags. Lynx can use different styles for <sup> and <sub>, but does apparently not (yet) support nested physical styles. Depending on the environment (e.g. OS/2 text window  vs. full screen ) <u> may not work with Lynx. In one tested Lynx 2.8.5 configuration <u>, <var>, <samp>, <kbd>, and <dfn> had no effect, <cite> was handled like <code>, as usual <em> was handled like <i>, and different colours were used for <code>, <strong>, <b>, <i>, and <tt>.

mnemonic tag(s) similar remarks
bold <b> <strong>
italic <i> <em> emphasis
variable <i><b> <var> often italic
citation <i><b><tt> <cite> often italic
teletype <tt> <code> often monospaced
sample <tt><i> <samp> often monospaced
keyboard <tt><b> <kbd> often monospaced
definition <dfn> often ignored
insertion <ins> HTML 4
deletion <strike> <del> HTML 4, dubious
strike <s><del>workaround
underline <u> <s> deprecated
superscript<sup><small><sub> <sub><b><small><i><sup><tt>
top Note that there is no style tag for reverse video.

Of course you would use the new <span> tag with a style like background: black; color: white instead of weird table constructs to force reverse video. See also four screenshots (JPeG, 200 KB) of this table rendered by Netscape 2.02 (= 3.x), Netscape 4.61, Lynx 2.8.5, and WebEplorer 1.1h.

The new HTML 4 <q> tag is a variant of <blockquote> used for inline quotations. Unfortunately WebExplorer  handles <q> and <blockquote> as identical block-level elements, but nobody really uses this OS/2 browser today except for compatibility tests. Modern browsers should or at least could render <q> content using quote marks corresponding to the language, e.g. &ldquo; ... &rdquo; , &bdquo; ... &rdquo; , or &laquo; ... &raquo; . For old browsers something like <i><q> could be used.

With Netscape 2.02  <i><q> is even better than explicit quote marks, because this browser doesn't know the entities &ldquo; , &rdquo; , and &bdquo;. See also my table of "(un)supported by Netscape 2.02 " Windows 1252 characters.

<q> tag and different languages
en<q lang="en">  fr<q lang="fr"> 
de<q lang="de">  es<q lang="es"> 

W3 validator Last update: 20 Jun 2005 6:00 by F.Ellermann