The <table> element represents data with more than one dimension, in the form of a table.
Simple example:
Table { Tr { Td{"Superman"}, Td{"Clark Kent"} }, Tr { Td{"Batman"}, Td{"Bruce Wayne"} } }; |
<table> <tr> <td>Superman</td><td>Clark Kent</td> </tr> <tr> <td>Batman</td><td>Bruce Wayne</td> </tr> </table> |
Complex example:
Table { clazz="table-striped"; Caption {"Super Heroes"}, THead { Tr { Th{"#"}, Th{"Hero Name"}, Th{"Real Name"} } }, TBody { superheroes.indexed.map((row) => Tr { Td{row.key.string}, Td{row.item.heroName}, Td{row.item.realName} }) } }; |
<table class="table-striped"> <caption>Super Heroes</caption> <thead> <tr> <th>#</th><th>Hero Name</th><th>Real Name</th> </tr> </thead> <tbody> <tr> <td>1</td><td>Professor X</td><td>Charles Xavier</td> </tr> <tr> <td>2</td><td>Deadpool</td><td>Wade Wilson</td> </tr> <tr> <td>3</td><td>Mr. Fantastic</td><td>Reed Richards</td> </tr> </tbody> </table> |
Technical details about this element can be found on the Official W3C reference.
no subtypes hierarchy
Initializer |
Table(Attribute<String> id = null, Attribute<String> clazz = null, Attribute<String> accessKey = null, Attribute<Boolean> contentEditable = null, Attribute<String> contextMenu = null, Attribute<Direction> dir = null, Attribute<Boolean> draggable = null, Attribute<DropZone> dropZone = null, Attribute<Boolean> hidden = null, Attribute<String> lang = null, Attribute<Boolean> spellcheck = null, Attribute<String> style = null, Attribute<Integer> tabIndex = null, Attribute<String> title = null, Attribute<Boolean> translate = null, Attributes attributes = [], {Content<Caption|ColGroup|THead|TBody|TFoot|Tr>*} children = []) Parameters:
|