Sunday, February 6, 2011

Another way to create table

From post how to insert table, had shown how to insert table in the post. By using the same example, here is the blog tips how to inset table in another way.

<table border=2>
<tr> <th>No</td><td></td><th>Item</td><td></td><th>Price</td> </tr>
<tr> <td>1.</td><td></td><td>Blouse</td><td></td><td>RM30.00</td> </tr>
<tr> <td>2.</td><td></td><td>Pijamas</td><td></td><td>RM8.90</td> </tr>
<tr> <td>3.</td><td></td><td>Scarf Lina</td><td></td><td>RM9.90</td></tr>
<tr> <td>4.</td><td></td><td>Skirt</td><td></td><td>RM6.90</td> </tr>
</table>
Table result as below;


NoItemPrice
1.BlouseRM30.00
2.PijamasRM8.90
3.Scarf LinaRM9.90
4.SkirtRM6.90



By sorting table header <th> as below, row eg to display the total sale in month XXX

<TABLE BORDER=2>
<TR> <TD>&nbsp;</TD>
     <TH>Week 1</TH>
     <TH>Week 2</TH>
     <TH>Week 3</TH>
     <TH>Week 4</TH>
     </TR>

<TR> <TH>Blouse</TH>
     <TD>$1070</TD>
     <TD>$1500</TD>
     <TD>$1700</TD>
     <TD>$500</TD>

<TR> <TH>Pyjamas</TH>
     <TD>$1270</TD>
     <TD>$1000</TD>
     <TD>$1400</TD>
     <TD>$1500</TD>

<TR> <TH>Scarf Lina</TH>
     <TD>$900</TD>
     <TD>$500</TD>
     <TD>$1400</TD>
     <TD>$1900</TD>

<TR> <TH>Skirt</TH>
     <TD>$1200</TD>
     <TD>$1600</TD>
     <TD>$1300</TD>
     <TD>$1570</TD>

</TABLE>

The table from above HTML will seen as below;


Week 1 Week 2 Week 3 Week 4
Blouse $1070 $1500 $1700 $500
Pyjamas $1270 $1000 $1400 $1500
Scarf Lina $900 $500 $1400 $1900
Skirt $1200 $1600 $1300 $1570


Hope this will help you in order how to create table in blogspot.

Note: To move the table in center location, please add before the above code <center> and </center> at the end.

No comments:

Related Posts Plugin for WordPress, Blogger...