h2g2 GuideML - TABLE - tag

1 Conversation


h2g2 GuideML - TABLE - tag

can someone tell the writers they forgot to show some things
+++show how to program these delicate issues
+++use indentation in the examples
+++use the sequence of the language!!
+++be more complete as some essential parameters are not noted
+++are there any Gurus out there??
+++or are they afraid to lose their 'job'
+++this has been written by Jim Lynn at 04:45 28-4-1999 ?

My .. do I have to rewrite the entire guide??


This is a draft completely revised H2G2 GuideML - TABLE - tag


The best property of tables in GuideMl is that your browser will create nice columns
1
and rows
2
for you. The space for one element inside a table is called a cell. If the content in one cell is wider then any of the others in the same column, all cells in that column will grow wider. Tables are a lot like building blocks, if you omit one part the whole structure gets unstable. This happens most with the Table Delimiters
3
.


Tables are used to lay out content in tabular format. The

<TABLE>

tag is the main construct, but a more complete list of tags:


  • <TABLE>

  • <CAPTION>

  • <TR>

    pronounciate as Table Row

  • <TH>

    pronounciate as Table Header
    4

  • <TD>

    pronounciate as Table Delimiter


optional parameters:


  • WIDTH="units"

  • HEIGHT="units"

  • BORDER="units"

    A value > 0 creates a border

  • CELLSPACING="units"

  • CELLPADDING="units"

  • BGCOLOR="color"

  • BORDERCOLOR="color"

  • ALIGN="horizontal position"

  • VALIGN="vertical position"

  • ROWSPAN="number of rows to span vertical"

  • COLSPAN="number of cells to span horizontal"

    not for use after caption


values for parameters:


  • "units"

    pixels by default, normal characters are 10 wide 20 high

    can be percentage, 100% for whole page width

    NB 100% height is not stable

  • "color"

    something like red, green, blue or

    more technical #rrggbb

  • "horizontal position"

    left or center or right

  • "vertical position"

    top or middle or bottom

  • "number of ..."

    not more then realy used to prevent unstable tables


There were no tables harmed to produce this help entry

Syntax




<TABLE>


 <CAPTION>Full table width cell with bold caption.</CAPTION>
5

 <TR>

  <TH>

   header cell content
67

  </TH>
8

 </TR>

 <TR>
9

  <TD>

   normal cell content
10

  </TD>
11

 </TR>

</TABLE>

Usage:


  • Start a table with a <TABLE> Open-tag, and close it with a corresponding </TABLE> Close-tag
    12.


  • Rows start with

    <TR>

    and are closed by

    </TR>

    . On each row we have to create the same count of cells.


  • Cells start with

    <TD>

    and are closed by

    </TD>

    . On each row we have to create the same count of cells.

  • 13

  • Any

    Open-tag

    can be followed by any parameter. Sizes are dependent from the enclosed element upward
    14.
    Alignments are valid for enclosed elements only. The font properties are (BBC generated this page) default inside each cell. The parser chokes on parameters after a closing tag!


  • If you want a cell to be blank, use

    &nbsp;
    15
    or

    <SMILEY TYPE="space"/>
    16
    or

    <SPACER TYPE="block" WIDTH="1" HEIGTH="1"/>
    17
    as the cell's contents to avoid your table to wiggle.


  • The

    CELLSPACING="0"

    is for the space between cell-border and neighbour cell.
    18


  • The

    CELLPADDING="0"

    is for the minimal space between cell-border and content.


  • The

    COLSPAN

    and

    ROWSPAN

    attributes make cells span multiple columns and rows

Known Issues


All browsers have their obscurity's, older versions are likely to fail for big and nested tables. Newer browsers still have their limits. -MU-

Example One

 RainfallSunlight
Britain30mZero
Everywhere Else0m12 hrs

<TABLE>
<TR>
<TH>
&nbsp;
</TH>
<TH>
Rainfall
</TH>
<TH>
Sunlight
</TH>
</TR>
<TR>
<TD>
Britain
</TD>
<TD>
30m
</TD>
<TD>
Zero
</TD>
</TR>
<TR>
<TD>
Everywhere Else
</TD>
<TD>
0m
</TD>
<TD>
12 hrs
</TD>
</TR>
</TABLE>

Example Two

The caption goes here
A Table of Meaningless Words
Multiple
Line
TopMiddleBottom
To the rightCentre

<TABLE BORDER="1">
<CAPTION>
The caption goes here
</CAPTION>
<TR>
<TH COLSPAN="4">
A Table of Meaningless Words
</TH>
</TR>
<TR>
<TD>
Multiple<BR/>
Line
</TD>
<TD VALIGN="TOP">
Top
</TD>
<TD VALIGN="MIDDLE">
Middle
</TD>
<TD VALIGN="BOTTOM">
Bottom<
/TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="RIGHT">
To the right
</TD>
<TD COLSPAN="1" ALIGN="CENTER">
Centre
</TD>
</TR>
</TABLE>

Further Information


Do not stumble over this pile of footnotes.

1
Vertical line of elements.
2
Horizontal line of elements.
3
Read on, you will get an answer.
4
It is up to your browser to make the content bold
5
A Caption is not required.
6
A Table Header is not required.
7
Any content is advisable, to stabilise the structure
8
Repeat as many times as you have columns.
9
Repeat as many times as you have rows.
10
Any content is advisable, to stabilise the structure
11
Repeat as many times as you have columns on any other row.
12
These open-close tags act in pairs.
13
I know this is rather redundant, however, I will follow original help entry content.
14
A cell higher than a row expands the row.
15
The &nbsp; can be focussed or selected
16
The <SMILEY TYPE="space"/> can be focussed or selected
17
The <SPACER TYPE="block" WIDTH="1" HEIGTH="1"/> can resize.
18
This is twice for border to border.

Bookmark on your Personal Space


Conversations About This Entry

Entry

A1096968

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry