TABLE
Main function is to set the table the composition of web pages. tags table is a blog written as follows:
<table>
</table>
to create a table must declare the number of rows and columns.
<tr> and </ tr> for line
<td> and </ td> for the column
is written as follows:
<table>
<tr>
<td> < td>
</tr>
</table>
all the information in form of text and images displayed in a table placed between the tags marked <td>.
example :
Main function is to set the table the composition of web pages. tags table is a blog written as follows:
<table>
</table>
to create a table must declare the number of rows and columns.
<tr> and </ tr> for line
<td> and </ td> for the column
is written as follows:
<table>
<tr>
<td> < td>
</tr>
</table>
all the information in form of text and images displayed in a table placed between the tags marked <td>.
example :
| Html Code | Result |
<table> <tr> <td>No. </td> <td>Name </td > </tr> </table> | ![]() |
| Html Code | Result |
<table border=1> <tr> <td>No. </td> <td>Name </td > </tr> <tr> <td>1.</td> <td>Budi</td> </tr> <tr> <td>2.</td> <td>Rudy</td> </tr> </table> | ![]() |
Tags table has attributes that can be used to combine the columns or rows:


TABLE
| Attribute | Value | Description |
|---|---|---|
| align | left center right | Deprecated. Use styles instead. Specifies the alignment of a table according to surrounding text |
| bgcolor | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies the background color for a table |
| border | pixels | Specifies the width of the borders around a table |
| cellpadding | pixels | Specifies the space between the cell wall and the cell content |
| cellspacing | pixels | Specifies the space between cells |
| frame | void above below hsides lhs rhs vsides box border | Specifies which parts of the outside borders that should be visible |
| rules | none groups rows cols all | Specifies which parts of the inside borders that should be visible |
| summary | text | Specifies a summary of the content of a table |
| width | pixels % | Specifies the width of a table |
TR
| Attribute | Value | Description |
|---|---|---|
| align | right left center justify char | Aligns the content in a table row |
| bgcolor | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies a background color for a table row |
| char | character | Aligns the content in a table row to a character |
| charoff | pixels % | Sets the number of characters the content will be aligned from the character specified by the char attribute |
| valign | top middle bottom baseline | Vertical aligns the content in a table row |
TD
| Attribute | Value | Description |
|---|---|---|
| abbr | text | Specifies an abbreviated version of the content in a cell |
| align | left right center justify char | Aligns the content in a cell |
| axis | category_name | Categorizes cells |
| bgcolor | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies a background color for a cell |
| char | character | Aligns the content in a cell to a character |
| charoff | pixels % | Sets the number of characters the content will be aligned from the character specified by the char attribute |
| colspan | number | Sets the number of columns a cell should span |
| headers | headercells'_id | Specifies the table headers related to a cell |
| height | pixels % | Deprecated. Use styles instead. Sets the height of a cell |
| nowrap | nowrap | Deprecated. Use styles instead. Specifies that the content inside a cell should not wrap |
| rowspan | number | Sets the number of rows a cell should span |
| scope | col colgroup row rowgroup | Defines a way to associate header cells and data cells in a table |
| valign | top middle bottom baseline | Vertical aligns the content in a cell |
| width | pixels % | Deprecated. Use styles instead. Specifies the width of a cell |
tasks:
create html like picture below :



Tidak ada komentar:
Posting Komentar