Welcome to My Website

Make Table In Blog

Posted by : Aji Setio Aji Tuesday, January 19, 2010




 

To make table at blog, can we do with code html special to make table of course. command at wear <table>. . . . . </table>. in table, we can several attributes in it, among others that is:
  • bgcolor : to regulate table background background/color. the code location likes this: bgcolor=" color code".
  • align : to regulate article location order exist in table, want left flat, middle, right flat, or flat left-right. the code location: align=" left" |" center" |" right".
  • cellpadding : to regulate distance between cell side with cell contents in a table. the code location: cellpadding=" pixel" .
  • border : to regulate margin thickness level in table. the code location: border=" pixel".
  • Cellspacing : to regulate distance between cell. the code location: cellspacing=" pixel".
  • height : to regulate tall table. the code location: height=" pixel" |" %".
  • height : to regulate lebal table. the code location: height=" pixel" |" %".


Code formed that is like this:

<table align="left"|"center"|"right"
bgcolor="color"
border="pixel"
cellpadding="pixel"
cellspacing="pixel"
width="pixel"|"%"
height="pixel"|"%">

.....................

</table>


a element table, also full several elements that is caption, element th(table header), element tr(table row), with element td (table row).

element caption functioned to make title from a table. this element has attribute align with value top (that is title at saves on the top table), also bottom (that is title resides in half under from table).

code formed that is like this:

<caption align="top"|"bottom">

............................

</caption>


element tr (table row) that is to make line, this element is at places in table element. attribute that can at use in in tr among others:
  • align : to regulate article location order exist in table, want left flat, middle, right flat, or flat kiri-kanan. the code location: align=" left" |" center" |" right".
  • valign : to regulate vertical position. the code location: valign=" top" |" middle" |" bottom".
  • bgcolor : to regulate table background background/colour colour. the code location likes this: bgcolor=" colour code".
code formed that is like this:

<tr align="left"|"center"|"right"
bgcolor="color"
valign="top"|"middle"|"bottom">

.....................

</tr>


element th(table header) functioned as header cell in a table column. attribute that can at wear among others:
  • align : to regulate article location order exist in table, want left flat, middle, right flat, or flat kiri-kanan. the code location: align=" left" |" center" |" right".
  • valign : to regulate vertical position. the code location: valign=" top" |" middle" |" bottom".
  • bgcolor : to regulate table background background/colour colour. the code location likes this: bgcolor=" colour code".
  • colspan : to regulate column. the code location: colspan=" number".
  • rowspan : to regulate row or line. the code location: rowspan=" number".


code formed that is like this:

<th align="left"|"center"|"right"
bgcolor="color"
valign="top"|"middle"|"bottom"
colspan="number" rowspan="number">

.....................

</th>


element tr(table row) elemn to make column. attribute that can at wear among others:
  • align : to regulate article location order exist in table, want left flat, middle, right flat, or flat kiri-kanan. the code location: align=" left" |" center" |" right".
  • valign : to regulate vertical position. the code location: valign=" top" |" middle" |" bottom".
  • bgcolor : to regulate table background background/colour colour. the code location likes this: bgcolor=" colour code".
  • colspan : to regulate column. the code location: colspan=" number".
  • rowspan : to regulate row or line. the code location: rowspan=" number".


code formed that is like this:

<td align="left"|"center"|"right"
bgcolor="color"
valign="top"|"middle"|"bottom"
colspan="number" rowspan="number">

.....................

</td>



still confused? if so i give several examples so that a little clearer:

to make a single table, the code approximately like this:

<table width="200" border="1">
<tr>
<td>

Contoh

</td>
</tr>
<table>


the result will like this:
Contoh


seen that existing article, appear huddle to table wall, when do we want so that article present exactly in the middle of table, so enough add code align="center" in the column. example likes this:

<table width="200" border="1">
<tr>
<td align="center">

Contoh

</td>
</tr>
</table>


the result will like this:
Contoh


Examples above use value border 1, try to compare when i use value border larger ones, for example 9. the code approximately like this:

<table width="200" border="9">
<tr>
<td align="center">

Contoh

</td>
</tr>
</table>


the result will like this:
Contoh


If we like to the column increases, live to add the column code. Example two columns, the code likes this:

<table width="300" border="9">
<tr>
<td align="center">

Contoh

</td>
<td align="center">

Contoh juga denk

</td>
</tr>
</table>


the result will like this:
Contoh
Contoh juga denk


if want two lines, approximately the code likes this:

<table width="300" border="1">
<tr>
<td align="center">

Contoh

</td>
<td align="center">

Contoh juga denk

</td>
</tr>
<tr>
<td align="center">

Contoh

</td>
<td align="center">

Contoh juga denk

</td>
</tr>
</table>


the result likes this:
Contoh
Contoh juga denk
Contoh
Contoh juga denk


if the table wants at give colour, live to add code bg. example:

<table width="300" border="1" bgcolor="black">
<tr
bgcolor="green">
<td align="center">

Contoh

</td>
<td align="center">

Contoh juga denk

</td>
<tr
bgcolor="yellow">
<tr>
<td align="center">

Contoh

</td>
<td align="center">

Contoh juga denk

</td>
</tr>
</table>


the result likes this:
Contoh
Contoh juga denk
Contoh
Contoh juga denk



Now I am giving a le latest (a little serious) with use function caption with th (table header). For example I want to make a data table from technician names. Data that want at make table, for example like this:
Tabel 1.1
Data Teknisi
No.
Nama
1.
Juned
2.
Jaka kelana
3.
Ibro


Code at wear can like this:
<table align="left" border="2" bgcolor="cyan" cellpadding="5" cellspacing="0" >
<caption align="top"><b>Tabel 1.1</b></caption>
<tr bgcolor="fuchsia">
<th colspan="2">Data Teknisi</th>
</tr>
<tr bgcolor="green">
<th>No.</th>
<th>Nama</th>
</tr>
<tr bgcolor="yellow">
<td>1.</td>
<td>Juned</td>
</tr>
<tr bgcolor="red">
<td>2.</td>
<td>jaka kelana</td>
</tr>
<tr bgcolor="blue">
<td>3.</td>
<td>Ibro</td>
</tr>
</table>



The result approximately like this:
Tabel 1.1
Data Teknisi
No.
Nama
1.
Juned
2.
jaka kelana
3.
Ibro





Besides to laid article, a table even also many at use to laid picture so that seen neater. Example:
<table width="300" border="1" cellpadding="20">
<tr>
<td align="center">

<a href="http://www.maniackom.blogspot.com" target="new"><img height="58" src=" http://i598.photobucket.com/albums/tt64/cah_tembok/maniackom-1.jpg" alt="mau pinter membuat blog atau website? klik saja di sini"/></a>
</td>
<td align="center">

<a href="http://www.dunia-chord.blogspot.com"><img src=" http://i598.photobucket.com/albums/tt64/cah_tembok/dunia-chord.jpg" alt="mau download chord gratis? klik saja di sini"/></a>
</td>
</tr>
<tr>
<td align="center">

<a href="http://www.kemayarancity.blogspot.com"><img src=" http://i598.photobucket.com/albums/tt64/cah_tembok/rahasiabloger-1.jpg" alt="mau tutorial blog terlengkap? klik saja di sini"></a>
</td>
<td align="center">

<a href="http://www.avasta-antivirusindonesia.blogspot.com" target="new"><img height="58" src=" http://i598.photobucket.com/albums/tt64/cah_tembok/DownloadAVasta.jpg" alt="mau antivirus GRATIS AVasta tercanggih? klik saja di sini"/></a>
</td>
</tr>
</table>

the result will like this:





If friend of opinion that table line harries scenery, so we can mensiasati by cause the loss of the line that is value border we make 0 (zero).
Example:
<table width="300" border="0" cellpadding="20">
<tr>
<td align="center">

<a href="http://www.maniackom.blogspot.com" target="new"><img height="58" src=" http://i598.photobucket.com/albums/tt64/cah_tembok/maniackom-1.jpg" alt="mau pinter membuat blog atau website? klik saja di sini"/></a>
</td>
<td align="center">

<a href="http://www.dunia-chord.blogspot.com"><img src=" http://i598.photobucket.com/albums/tt64/cah_tembok/dunia-chord.jpg" alt="mau download chord gratis? klik saja di sini"/></a>
</td>
</tr>
<tr>
<td align="center">

<a href="http://www.kemayarancity.blogspot.com"><img src=" http://i598.photobucket.com/albums/tt64/cah_tembok/rahasiabloger-1.jpg" alt="mau tutorial blog terlengkap? klik saja di sini"></a>
</td>
<td align="center">

<a href="http://www.avasta-antivirusindonesia.blogspot.com" target="new"><img height="58" src=" http://i598.photobucket.com/albums/tt64/cah_tembok/DownloadAVasta.jpg" alt="mau antivirus GRATIS AVasta tercanggih? klik saja di sini"/></a>
</td>
</tr>
</table>

The result will like this:

how does this last the result, our eye can at trick not?


little note. because code on be code html, so at the (time) of posting must on course edit html don't on course compose. when want at save at sidebar, choose to html/javascript.

Good useful …


0 komentar

Post a Comment

Undangan Pernikahan Online

Undangan Pernikahan Online
Undangan Pernikahan Online dalam bentuk web. Praktis dan mudah dibagikan.

Email Subscriptions


Enter your email address:

Delivered by FeedBurner


Translator


English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified
The Best Translator

Followers

About Me

My photo
Ngeblog adalah hobi saya sejak dalam kandungan (hahahah), Thanks buat semuanya yang udah berkunjung ke blog ane, semoga bermanfaat..