Re: How to mark up examples in W3C technical reports

Charles McCathieNevile wrote:

>  I think it is  a fine idea to move away from tables. In the SVG access note -
>  http://www.w3.org/TR/SVG-access - we used div elements, containing pre that
>  contained code... and a style sheet

I think SVG access is a valuable model. Instead of caption or table
header elements you have a figure number and text caption, which make a
border make sense. The 'strong' markup inside pre brings another
dimension to examples. The whole effect is meaning-encrusted.

This week we got unlabeled pre working pretty well in Netscape 4,6 and
Mac IE 3,4,5 in the CSS3 Selectors WD [1]:

pre {
	background-color: #d5d5d5;
	margin: 1em 1cm;
	padding: 0 0.3cm;
	white-space: pre;  /* for NS4 */
	border: none;      /* for NS4 */
	font-size: 92%;
}

[1] 
http://www.w3.org/TR/2001/WD-css3-selectors-20010126/#attribute-representation

Eve L. Maler wrote:

>  is background-color widely enough supported to be "safe"?

It is unsupported in IE 3 on Macs at least. In the case above,
body is white, and background renders in stair steps so there may be
some use for background-color. (It shouldn't be used for example to
reverse colors in table headers. If body was white, background-color
was black, and text color was white, the header would be invisible.
That might be what Eve is referring to.)

-- 
Susan Lesch - mailto:lesch@w3.org  tel:+1.858.483.4819
World Wide Web Consortium (W3C) - http://www.w3.org/

Received on Saturday, 27 January 2001 19:58:04 UTC