World Wide Web Consortium (W3C)
Massachusetts Institute of Technology (MIT)
Laboratory for Computer Science
545 Technology Square
Cambridge, MA 02139
USA


Date: Tue, 22 Jun 1999 02:27:26 +0100 (GMT Daylight Time)



Mr. Rod Welch
The Welch Company
440 Davis Court #1602
San Francisco, CA 94111 2496
rowelch@ibm.net

Subject: W3C HTML specs - Question

Rod,

[This responds to your letter on Fri, 18 Jun 1999 - you asked three (3) questions, shown here in italics]

  1. What is a "pixel"?

    I found your section 6.6 that refers to C..., but that source did not seem to have an explanation of pixel. I appreciate that a pixel is similar to pixel in PCL, but how many pixels to an inch. If we specify 500 pixels wide, or 15 pixels high, what does it mean?

    Dave Responds

    Pixels in web browsers refer to screen pixels and need to be scaled when printing. The W3C specification for CSS gives a useful definition. However, a practical approach is to make the standard web pages fit reasonably across the printable area of a page, allowing for margins.

  2. How can we specify the height of a cell?

    Evidently the height attribute for td is not supported by Internet Explorer. Spacer command is not supported by IE, although it works in Netscape. Is there another way to specify "white space" for positioning content in a cell, something like this... [example below]

    We can use div to position "Company ABC" horizontally, but how can we position it vertically. Spacer and height could be used, but don't seem to work in Netscape.

  3. Can rows and columns be "nested"?

    In the example, rowspan 2 for the first cell, and a nested row for the second cell displays "Proposal" and "Approved" correctly. The 3rd cell also works, because it also has two rows, but the 4th cell wraps back to the left margin.

    Dave Responds

    Your example table can be created using regular HTML. The first and last cells span 2 rows, the duration cell spans 2 columns. You can control the vertical and horizontal alignment of cell contents via attributes. The padding can be controlled via the cellspacing attribute and with greater control via CSS style properties.

    [table border="1" cellpadding="10">
    [tr>
    [td rowspan="2" valign="top">Organization[br>[br>Company ABC[/td>
    [td>Proposal[/td>
    [td colspan="2" align="center">Duration[/td>
    [td rowspan="2">Aproving[br>[br>Agency[/td>
    [/tr>
    [tr>[td>Approved[/td>
    [td>Mon[/td>
    [td>Yrs[/td>
    [/tr>
    [/table>












    Organization

    Company ABC
    Proposal Duration Aproving

    Agency
    Approved Mon Yrs


In the longer term we expect tables to be formatted according to the rules specified in the W3C style sheets activity, see for instance

http://www.w3.org/TR/REC-CSS2

In the short term, you will have to make do with some less than perfect work arounds. I recommend you experiment with the CSS properties for margins and padding as well as the cellpadding and alignment attributes in HTML.


  /------------------------+-----------+----------+------------\
  | Organization           | Proposal  | Duration |            |
  |                        |           |          | Approving  |
  | Company ABC            +-----------+-----+----+            |
  |                        |  Approved | Mon | Yrs|   Agency   |
  |                        |           |     |    |            |
  \------------------------+-----------+----------+------------/


Sincerely,

World Wide Web Consortium
(on assignment from HP Labs)


Dave Raggett
dsr@w3.org
http://www.w3.org/People/Raggett
phone: +44 122 578 2984 (or 2521)
+44 385 320 444 (gsm mobile)


Copy to:

  1. lehors@w3.org, ij@w3.org