Professional Documents
Culture Documents
Words to Remember!
The tables are defined with the <table> and close by an ending </table> tag.
A table is divided into rows with the <tr> tag, and each row is divided into data
cells with the <td> tag. td stands for "table data”. Table data holds the content of a data
cell it can can contain text, links, images, lists, forms, other tables, etc.
not specify a border the table will be displayed without borders. To display a table with
Save your file as simpletable.html and run the browser to see the output.
Table Headings
From a plain table you can also put a header unto it. Header information in a
table are defined with the <th> tag. The text in a th element will be bold and centered as
you run your browser. Type the following example to see the difference from a palin
From the given example above we set a table with 3 heading and each heading
has 3 table data. Aside from 2-3 data you can also add another data just by adding a
guide the viewer what table are they already on your page. By using the <caption> tag
you add caption or title each table you add in your page. Take a look in our example
below.
Table cell that span more than one row and column
In html table span is used to split the table into column and rows and it comes
Two types
In the example above you will notice that the Telephone has split into two two columns
As shown in the example above Cellphone row is split into 2 cells it is because
element example adding table inside the row or cell, adding pictures inside a table and
even adding lists. Try to encode all the code below and run your browser to see the
output.
In the example above we have inserted another element inside the table one of
those element are table iside the table and bulleted list. List will be discuss to the next
lesson.
Adding Cellpadding
Cellpadding is used to create more white space between the cell content and its
borders. Let us compare the difference between table with cellpadding and table without
cellpadding. Type the following code below and run your browser to see the output.
In the example above the text inside the cell are wrapped inside the cell. To
make a whitespace inside the table cell you can use a <cellpadding> tag. Next figure is
Tag description
<table> Define table
<th> Define a table header
<tr> Define a table row
<td> Define a table data or cell
<caption> Define a table caption
<colgroup Defines a group of columns in a table, for formatting
>
<col/> Defines attribute values for one or more columns in a table
<thead> Groups the header content in a table
</tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table
Lesson Summary
• The tables are defined with the <table> and close by an ending </table> tag.
• A table is divided into rows with the <tr> tag, and each row is divided into data
cells with the <td> tag. td stands for "table data”. Table data holds the content of
a data cell it can can contain text, links, images, lists, forms, other tables, etc.
• By using the <caption> tag you add caption or title each table you add in your
page.
• In html table span is used to split the table into column and rows and it comes
• Cellpadding is used to create more white space between the cell content and its
borders
Study Help
Name: Score:
Year/School: Date:
Test I Hands-on Application
open.
to 10.
order.
Study Help
Name: Score:
Year/School: Date:
Test II Identification
Number A B C D
1 <td> <tr> <table> <th> This tag is used to
row
3 <td> <tr> <table> <th> Defines the table
data
4 <td> <tr> <table> <th> Defines a table
header
5 <caption> <tfoot> <thead> <tbody> Used to group the
footer
6 <caption> <tfoot> <thead> <tbody> Used to group the
header content
7 <caption> <tfoot> <thead> <tbody> Use to group the
table body
8 <caption> <tfoot> <thead> <tbody> Used to add caption
whitespace
10 <p> <cellpadding> <colspan> <title> Uesd to split a row or
cell