<table width="80%">
<table caption="table caption" sortable="true">
table-layout:fixed; word-wrap: break-word;
<table width="50%"> <tableHeader> <column width="30%">column 1</column> <column width="70%">column 2</column> </tableHeader> <row> <cell>the_very_long_name_which_will_take_all_the_place</cell> <cell>the value with should be on a large width</cell> </row> <row> <cell>name</cell> <cell>value</cell> </row> </table>We will have the following result:
| column 1 | column 2 |
|---|---|
| the_very_long_name_which_will_take_all_the_place | the value with should be on a large width |
| name | value |
<table width="50%" fixedLayout="true"> <tableHeader> <column width="30%">column 1</column> <column width="70%">column 2</column> </tableHeader> <row> <cell>the_very_long_name_which_will_take_all_the_place</cell> <cell>the value with should be on a large width</cell> </row> <row> <cell>name</cell> <cell>value</cell> </row> </table>We will have the following result, respecting the columns relative width:
| column 1 | column 2 |
|---|---|
| the_very_long_name_which_will_take_all_the_place | the value with should be on a large width |
| name | value |
<table caption="table caption" position="right"> <tableHeader> <column>first column</column> <column>second column</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> <row> <cell>name2</cell> <cell>value2</cell> </row> </table>For example, a float table:
<table float="true" position="right"> <tableHeader> <column>first column</column> <column>second column</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> <row> <cell>name2</cell> <cell>value2</cell> </row> </table>
<table borders="false"> <row> <cell><img id="image1"/></cell> </row> <row> <cell><img id="image2"/></cell> </row> </table>
<table padding="small"> <row> <cell>my cell</cell> </row> <row> <cell>my other cell</cell> </row> </table>With the following result:
| my cell | my other cell |
<table padding="large"> <row> <cell>my cell</cell> </row> <row> <cell>my other cell</cell> </row> </table>With the following result:
| my cell | my other cell |
tableHeader element define the columns in the table:<table> <tableHeader> <column>column 1</column> <column>column 2</column> </tableHeader> </table>
column element is a child of the tableHeader element. It defines one column in the table.<table> <tableHeader> <column width="30%" align="center">Type</column> <column width="70%">Content</column> </tableHeader> </table>For example:
<table> <tableHeader> <column width="10%" align="center">first column</column> <column width="40%" align="left">second column</column> </tableHeader> <row> <cell>name</cell> <cell>the cell text</cell> </row> <row> <cell>name2</cell> <cell>the second cell text</cell> </row> </table>Will have the following result:
| first column | second column |
|---|---|
| name | the cell text |
| name2 | the second cell text |
row element define each row in the table.<table> <row color="green"> <cell>name</cell> <cell>the cell text</cell> </row> <row borders="false"> <cell>name2</cell> <cell>the second cell text</cell> </row> </table>Will have the following result:
| name | the cell text |
| name2 | the second cell text |
<table> <tableHeader> <column>first column</column> <column>second column</column> </tableHeader> <row borderBottom="dashed"> <cell>name</cell> <cell>the cell text</cell> </row> <row> <cell>name2</cell> <cell>the second cell text</cell> </row> </table>Will have the following result:
| first column | second column |
|---|---|
| name | the cell text |
| name2 | the second cell text |
widths attribute for a row specifies custom widths for the row cells, regardless of the fact that the table has specified column widths or not.<table width="60%"> <row widths="50% 50%" > <cell>name</cell> <cell>the cell text</cell> </row> <row widths="20% 80%" > <cell>name2</cell> <cell>the second cell text</cell> </row> </table>Will have the following result:
| name | the cell text |
| name2 | the second cell text |
cell element define each cell in the table.<table> <row> <cell align="center">name</cell> <cell>the cell text</cell> </row> <row> <cell color="green" colspan="2">the cell text</cell> </row> </table>Will have the following result:
| name | the cell text |
| the cell text | |
<table caption="table caption"> <tableHeader vertical="true"> <column>first row</column> <column>second row</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> <row> <cell>name2</cell> <cell>value2</cell> </row> </table>Result:
| first row | second row |
|---|---|
| name | value |
| name2 | value2 |
thead element. This means that if you want to use customized styles for tables with vertical headers, styles which are defined for the thead element will be applied to the header column th elements instead.<table> <tableHeader vertical="true" style="background: gray; color: white;"> <column>first row</column> <column>second row</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> ... </table>will have the following HTML result:
<table class="border" > <caption class="tablecaption" >table caption</caption> <thead class="notSortable"> </thead> <tbody> <tr> <th valign="center" style="background: gray; color: white;" class="column border" >first row</th> <td valign="center" class="border">name</td> <td valign="center" class="border">value</td> </tr> <tr> <th valign="center" style="background: gray; color: white;" class="column border" >second row</th> <td valign="center" class="border">name2</td> <td valign="center" class="border">value2</td> </tr> </tbody> </table>
<table caption="table caption"> <tableHeader> <column>first column</column> <column>second column</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> <row> <cell color="#00FF00">name2</cell> <cell>value2</cell> </row> </table>Result:
| first column | second column |
|---|---|
| name | value |
| name2 | value2 |
<table> <tableHeader> <column width="200">first column</column> <column width="300">second column</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> <row> <cell>name2</cell> <cell>value2</cell> </row> </table>Result:
| first column | second column |
|---|---|
| name | value |
| name2 | value2 |
<table sortable="true"> <tableHeader> <column width="150">first column</column> <column width="150">second column</column> </tableHeader> <row> <cell>name</cell> <cell>value</cell> </row> <row> <cell>name2</cell> <cell>value2</cell> </row> </table>Result:
| first column | second column |
|---|---|
| name | value |
| name2 | value2 |
docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.