I like using tables. In the old forums it was easy to do by using the code blocks. Unfortunately, that doesn’t work here. Fortunately, there is table syntax, according to this thread:
Unfortunately, I can’t figure out how to use the table syntax. And so, my first test begins.
══════════════════════════════════════════════════════════
Well, I figured out how to create a table. But, I can’t figure out how to align the text. Starting to get a headache. I’m trying to left align columns 1 and 3, but leave column 2 as it is.
Will try again later.
Syntax used:
<table>
<tr><th>Open bullet</th>
<th>=</th>
<th>Legendary Power has not been extracted.</th>
<tr><th>Solid yellow bullet</th>
<th>=</th>
<th>Legendary Power has not been extracted.</th>
<tr><th>Solid orange bullet</th>
<th>=</th>
<th>Legendary Power cannot be extracted.</th>
<tr> is data row. <th> is header cell. <td> is data cell.
<table>
<tr>
<th><b>Column 1</b></th>
<th>=</th>
<th><b>Column 3</b></th>
</tr>
<tr>
<td>Open bullet</td>
<td>=</td>
<td>Legendary Power has not been extracted.</td>
</tr>
<tr>
<td>Solid yellow bullet</td>
<td>=</td>
<td>Legendary Power has not been extracted.</td>
</tr>
<tr>
<td>Solid orange bullet</td>
<td>=</td>
<td>Legendary Power cannot be extracted.</td>
</tr>
</table>
Column 1
=
Column 3
Open bullet
=
Legendary Power has not been extracted.
Solid yellow bullet
=
Legendary Power has not been extracted.
Solid orange bullet
=
Legendary Power cannot be extracted.
There are more examples in this thread (on EU forum):
This time I put codes on separate lines. One: because The Forum Guide shows it this way and two: it’s easier for me to keep track of. I also remembered to add the “end table” code at the end of the table. As far as aligning the text in columns 1 and 3, it was just a matter of changing an “h” to “d”. That is to say, where there was a <th> I replaced it with <td>.
I still don’t know how to use the alignment codes :--, :--: or --:. Tyrael help me if I need to right-align a column.
Syntax used this time:
<tr>
<td>Open bullet</td>
<th>=</th>
<td>Legendary Power has not been extracted.</td>
<tr>
<td>Solid yellow bullet</td>
<th>=</th>
<td>Legendary Power has not been extracted.</td>
<tr>
<td>Solid orange bullet</td>
<th>=</th>
<td>Legendary Power cannot be extracted.</td>
</table>
Which produces this:
Open bullet
=
Legendary Power has not been extracted.
Solid yellow bullet
=
Legendary Power has not been extracted.
Solid orange bullet
=
Legendary Power cannot be extracted.
Edit: I didn’t see your edit until I posted. Looking at your syntax I still don’t see how you centered the column headings (Column 1 and Column 3).
I’ll keep looking and testing. I’ll figure it out eventually.
Edit 2: Oh! I think I get it. <th> is the header and is centered by default. <td> is data, which is left-aligned by default.
I still want to figure out how to use the alignment codes though.
Do me a favor and refresh or log in and out then check your trust levels. If it works you should now have full formatting powers and Wiki powers. Boubou too.
| Column 1 | Column 2 | Column 3 |
| :-- | :-: | --: |
| This is left aligned | This is centered | This is right aligned |
Which produces this:
Column 1
Column 2
Column 3
This is left aligned
This is centered
This is right aligned
I could swear I tried this first and it wouldn’t work for me.
But the column headings should be centered. Going to add a line and see what happens.
New syntax:
| :-: | :-: | :-: |
| Column 1 | Column 2 | Column 3 |
| :-- | :-: | --: |
| This is left aligned | This is centered | This is right aligned |
Which produces this:
| :-: | :-: | :-: |
Column 1
Column 2
Column 3
This is left aligned
This is centered
This is right aligned
Well, that didn’t work. No matter what I do, with this syntax, the column headings “Column 1” is left aligned, “Column 2” is centered and “Column 3” is right aligned. This is what I want for the data, but not the headings.
Just keep in mind your TL3 only applies to the US forums, not the other regions.
Both of you and Boubou too.
I did not really do it. I just had to make the case for it to Blizz. Nevalistis and Vrakthris are the ones who, with mgt approval, did it. Further, your TL 3 is not going to decay if you don’t post enough. You three don’t really chat a lot, you mostly spend your time helping folks so kind of need images and such.
They do. Mask handles some of the Asia stuff and Boubou is active on the EU English and French forums. I don’t know anyone there though and am not an MVP there so I can’t get them upgraded permissions. BUT, they can make posts here then link them on the other forum. That lets them use their powers for good still.
After some tests, …
The easy format only allow one format line. i.e. the line between header and detail.
The format applies to both header and detail. So, the first format line is not part of the table.
If you want to control the format of individual cell, use DIV tags in HTML format:
```sql
select *
from emp e
join dept d – either order works
on e.emp=d.emp;
```
select *
from emp e
join dept d -- either order works
on e.emp=d.emp;
/* what about really large comments */
-- comments seem to wokr
#!/bin/bash
// but not c++ comments
I tried working with the “div” and “align” tags earlier, but could never figure out how to include them in the syntax. You have saved me, probably, hours of testing through trial-and-error.
I hope you don’t mind if I copy your syntax and save it as a document template for future tables.
I consider this acceptable. I know there’s a way to specify column widths and other things. But, I don’t really want to get into studying HTML coding, or whatever it’s called. (One reason I never pursued computer programming is I’m still trying to learn my native language… English ).
I used <th>-</th> to center the dash and <th>=</th> to center the equals sign, by default. Well… anything that needs centering.
I use <td>Expert</td>, for example, for left align, by default.
Otherwise I would end up using <td><div align="center">-</div></td> and <td><div align="center">-</div></td>, respectively, which is a lot more to type. And it achieves the same results as far as I can tell.
It seems like the only time I need to use the “long” version is when I need to right align a column that starts with 1 digit and ends with 2 or more digits.
I mean, I know “th” designates “header” and “td” designates “data”. But, I believe that “less is more”, whenever possible.