HTML BASIC 3

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 :
Html CodeResult

<table>
<tr>
<td>No. </td>
<td>Name </td >
</tr>
</table>




Html CodeResult

<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:

from the table above are combined rows or columns as below

tags "table", "tr" and "td" have atribute that can be used to set the table display, the attribute is.

TABLE

AttributeValueDescription
alignleft
center
right
Deprecated. Use styles instead.
Specifies the alignment of a table according to surrounding text
bgcolorrgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the background color for a table
borderpixelsSpecifies the width of the borders around a table
cellpaddingpixelsSpecifies the space between the cell wall and the cell content
cellspacingpixelsSpecifies the space between cells
framevoid
above
below
hsides
lhs
rhs
vsides
box
border
Specifies which parts of the outside borders that should be visible
rulesnone
groups
rows
cols
all
Specifies which parts of the inside borders that should be visible
summarytextSpecifies a summary of the content of a table
widthpixels
%
Specifies the width of a table

TR

AttributeValueDescription
alignright
left
center
justify
char
Aligns the content in a table row
bgcolorrgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies a background color for a table row
charcharacterAligns the content in a table row to a character
charoffpixels
%
Sets the number of characters the content will be aligned from the character specified by the char attribute
valigntop
middle
bottom
baseline
Vertical aligns the content in a table row

TD
AttributeValueDescription
abbrtextSpecifies an abbreviated version of the content in a cell
alignleft
right
center
justify
char
Aligns the content in a cell
axiscategory_nameCategorizes cells
bgcolorrgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies a background color for a cell
charcharacterAligns the content in a cell to a character
charoffpixels
%
Sets the number of characters the content will be aligned from the character specified by the char attribute
colspannumberSets the number of columns a cell should span
headersheadercells'_idSpecifies the table headers related to a cell
heightpixels
%
Deprecated. Use styles instead.
Sets the height of a cell
nowrapnowrapDeprecated. Use styles instead.
Specifies that the content inside a cell should not wrap
rowspannumberSets the number of rows a cell should span
scopecol
colgroup
row
rowgroup
Defines a way to associate header cells and data cells in a table
valigntop
middle
bottom
baseline
Vertical aligns the content in a cell
widthpixels
%
Deprecated. Use styles instead.
Specifies the width of a cell


tasks:
create html like picture below :

Tidak ada komentar:

Posting Komentar