How To Add Table To Blog Post



How to include table in blog post?
How to add boxes for text in blog post?

AB
CD

Here's the example of the code used to create a table with 2 rows and 2 columns.

center" border="1" cellpadding="5" cellspacing="1" width="400">
AB
CD

As you can see, is the tag to begin a row, and the tag ends with .

While in between and , we have to indicate a particular column in the row, and it ends with . In between that, you can type the text you want. The example given is "A".

You can have as many your text you want in between the and tag.

Once you are done with a particular row, you can start another row my using again. And the process continues.

You can also modify the values of table align, border, cell padding and cell spacing. Changing the values will show different table styles. Try it out.

For the width, you can either use the pixel value (example "400") or the percentage (example "90%") to suite your preference.

Here's an example of another table with these values:

table align="center" border="10" cellpadding="10" cellspacing="10" width="90%"

And you might also want the values to be in the center. So just add
A
to the text.

A
B
C
D

Feel free to try it. Enjoy!




0 comments: