How to Make an HTML Table
HTML is a web-based programming language that can be used to create a web.Tutorial HTML design that I will give for this post is about how to create an HTML table, in fact this tutorial learning HTML can we meet on w3schools.com, but since this tutorial is useful -edit to edit the blog template (associated with blogging) so I am posting hERE
Here's the HTML code we will use to create html table:
<table> </ TABLE> - is a start tag, as a marker of the beginning and the end of a table creation.
<TR> </ TR> - a tag which serves to indicate an existing row in the table
<TD> </ TD> - a tag that is useful to divide the rows into multiple columns for the table.
And from the tag has attributes as below:
bgcolor - for backgorund color of the table
background - this is where it can be used if we want to create a table in the background of an image capture
width - useful as an attribute to specify the width of the table
height - the height chart
align - a useful attribute to set the horizontal alignment
valign - attributes that are useful to adjust the vertical alignment
border - this attribute is useful as an attribute to specify the width of the frame on the table
cellspacing - attribute to specify the spacing between columns
cellpadding - determine the distance between the edge of the column contents (can be said margin)
colspan - attributes that are useful to determine how many columns the table to be merged
cowspan - attributes that are useful to determine how many rows to be merged
As an example of the use of tables, can be seen through several examples of its tables and html coding:
<HTML>
<BODY>
<TABLE WIDTH="80%" border="1">
<TR>
<TD> This is the first column </ TD>
<TD> This is the second column </ TD>
</ TR>
<TR>
<TD> This is the first column second row </TD>
<TD> This is the second column row second </TD>
</ TR>
</ TABLE>
</ BODY>
</ HTML>
-----------------------
<HTML>
<BODY>
<TABLE WIDTH = "80%" BORDER = "3">
<TR>
<TD Bgcolor="#009911"> This is the first column </ TD>
<TD Background="background.gif"> This second column </ TD>
</ TR>
<TR>
<TD> This is the first column second row </ TD>
<TD> This is the second column second row </ TD>
</ TR>
</ TABLE>
</ BODY>
</ HTML>
-----------------------
<HTML>
<BODY>
<TABLE WIDTH="80%" border="1">
<TR>
Bgcolor="#009900" <TD width="70%">
This is the first column </ TD>
Background="background.gif" <TD width="30%">
This is the second column </ TD>
</ TR>
<tr Height="200">
<TD Valign="top"> This is the first column second row </ TD>
<TD
align = "right"> This is the second column second row </ TD>
</ TR>
</ TABLE>
</ BODY>
</ HTML>
-----------------------
<HTML>
<BODY>
<TABLE WIDTH="80%" BORDER="1" CELLPADDING="5">
<TR>
<TD
bgcolor = "# 009900" width = "70%">
This is the first column </ TD>
<TD
background = "background.gif" width = "30%">
This is the second column </ TD>
</ TR>
<tr Height="200">
<TD Valign="top"> This is the first column of row
second </ TD>
<TD Align="right"> This is the second column second row </ TD>
</ TR>
</ TABLE>
</ BODY>
</ HTML>
-----------------------
<HTML>
<BODY>
<TABLE WIDTH="80%" BORDER="1" CELLSPACING="5">
<TR>
<TD
bgcolor = "# 009900" width = "70%">
This is the first column </ TD>
<TD
background = "background.gif" width = "30%">
This is the second column </ TD>
</ TR>
<tr Height="200">
<TD Valign="top"> This is the first column of row
second </ TD>
<TD Align="right"> This is the second column second row </ TD>
</ TR>
</ TABLE>
</ BODY>
</ HTML>
-----------------------
<TABLE WIDTH = "80%" BORDER = "1"
Cellspacing = "5">
<TR>
<TD Bgcolor="#009900" COLSPAN="2">
This column
combined </ TD>
</ TR>
<tr Height="200">
<TD
valign = "top"> This is the first column second row </ TD>
<TD Align="right"> This is the second column
The second row </ TD>
</ TR>
</ TABLE>
-----------------------
<TABLE WIDTH="80%" BORDER="1" CELLSPACING="5">
<TR>
<TD
bgcolor = "# 009900" width = "70%" ROWSPAN = "2">
This is the first column of the combined </ TD>
<TD
background = "background.gif" width = "30%">
This is the second column </ TD>
</ TR>
<tr Height="200">
<TD Align="right"> This is the second column second row </ TD>
</ TR>
</ TABLE>
Hope it helps,,
0 komentar:
Posting Komentar