In this tutorial we will learn how to insert two different forms of table & the related syntax of how rows & columns are generated
Columns & Rows
The following is an example of a 2x3 (2 rows & 3 columns) table syntax used in our forum.
[table]
[tr][td]Heading 1[/td][td]content[/td][/tr]
[tr][td]Heading 2[/td][td]content[/td][/tr]
[tr][td]Heading 3[/td][td]content[/td][/tr]
[/table]
One can observe that any table is enclosed within [table]...[/table] The presence of [tr]...[/tr] defines the new row while any number of [td]...[/td] within a single [tr]...[/tr] defines the number of columns in that row.
Horizontal Headings
[table class="hor"]
[tr][td]Heading 1[/td][td]Heading 2[/td][/tr]
[tr][td]content[/td][td]content[/td][/tr]
[tr][td]content[/td][td]content[/td][/tr]
[/table]
Adding class="hor" besides the opening [table] brackets automatically formats a table where heading are arranged horizontally. See the bold & blue background identifies heading entry.
See Example
Vertical Headings
[table class="ver"]
[tr][td]Heading 1[/td][td]content[/td][/tr]
[tr][td]Heading 2[/td][td]content[/td][/tr]
[tr][td]Heading 3[/td][td]content[/td][/tr]
[/table]
Adding class="ver" besides the opening [table] brackets automatically formats a table where heading are arranged vertically. Again the bold & blue background identifies heading entry.
See Example
|