Hey guys, Kuro here! Welcome to the secon part of this tutorial of tables for you guys who have interest in making them for whatever reason! Today, We will lear to make the basic tables! Let's go!
Ok, today we will deal with the basic tables. If you didn't saw the previous part, go there to take a look, or you will lost here, and isn't that long. Ok, first, the basic of the basics.
To begin a table, you will have to combine the previous commands table, tr and td. First, it'll be like this:
(table)(tr)(td)(/td)(/tr)(/table)
You will aso decorate the order of the commands. The table rows will always be first one that you will open right after the table command. Inside the tr command, you will use the td command, this will create the text boxes that you will need. The result will be like this.
With text:
Text
Simple. And always remember, you will have all the cmmands insinde the brackers [], or it'll not work. Alright, now, for multiple table rows. This is very simple. First, you will make the basic line above:
(table)(tr)(td) Text (/td)(/tr)
But now, you will not close the table. Instead, you just do like this:
(table)(tr)(td) Text (/td)(/tr)
(tr)(td) Text 2 (/td)(/tr)(/table)
Simple. You can make as much rows as you want. You also doesn't need to press enter to go one line down, you can create a constant thing, like this:
(table)(tr)(td) Text (/td)(/tr)(tr)(td) Text 2 (/td)(/tr)(/table)
This tale has been unlawfully lifted from Royal Road; report any instances of this story if found elsewhere.
This will also work, but I don't recommend it sonce it'll make a mess and it will be harder to find your mistakes. Ok, next!
Now, we will pean to make multiple table divisions (td), meaning, we will create pretty boxes like those ones that you see in the novels. And you will also nderstand why authors hate so much(I'm not included) to make tables. For this the things will be a bit different.
let's call that first command line become the "basic line".
(table)(tr)(td)(/td)(/tr)(/table) <- that's the basic line.
Now, we will pick the td command.
(td)(/td)
The first line will define how much divisions your table will have. To define this, we will numbers together with the td command. Let's see... for exemple, a table with two table divisions will have the first line like this:
(table)(tr)(td2)(/td2)(/tr)(/table)
Noticed the number 2 in the td command? This defines the number of "divisions". Of course, there are other aplications, but that's for later. For now, let's focus on this. Now, you table have two divisions, meaning, you can split the row in two boxes. Like this:
box n°1 box n°2
Please, take note that the table above has a different command from the basic line, the basic line will show up like this:
Box
To make the boxes split, you will have to define the size of the division... let's call each box unit for now, it's easier to understand. Are you taking notes? Anyway, let's continue. To set the "value(size)" of the unity, you will have to give the value to the td command of your wished size. For exemple:
(td1)(/td1)
The 1 on the command above will give that unit that value. To ilustrate, you can see like this:
(table)(tr)(td2) Text (/td2)(/tr)
(tr)(td1) 1° unity (/td1)(td1) 2° unity (/td1)(/tr)(/table)
See how in the second line of command each td has it's value? When you do like that, it will show up as a table like this:
Text 1° unity2° unity
See? Quite easy. You can also give bigger values, making different things. For exemple:
(table)(tr)(td4) Text (/td4)(/tr)
(tr)(td3)1° unity(/td3)(td1)2° unity(/td1)(/tr)
(tr)(td1)3° unity(/td1)(td2)4° unity(/td2)(td1)5° Unity(/td1)(/table)
That command will give the basic value of 4, giving you a total of four unitys to use. Depending on the value that you give to the unity, that unity will take a certain space on the table. The commands above will result in this table:
Text 1° unity2° unity 3° unity4° unity5° Unity
See? Quite easy, right? You just have to keep your eyes open and always use the preview tool to see if the table doesn't have any mistake. You can see that easily, since the mistake is easy to find. If you mess up a td command for exemple, when you look at the table, you can have an idea where in the whole code the mistake is.
Next post, a deeper tutorial in the tables.