0% found this document useful (0 votes)
17 views8 pages

HTML

The document discusses HTML tables. It states that tables are defined with <table> tags and contain rows (<tr>) and data cells (<td>). It provides examples of basic tables with one column, one row with multiple columns, and multiple rows with multiple columns. It also demonstrates how to use colspan to make a cell span multiple columns and rowspan to make a cell span multiple rows.

Uploaded by

Mat Jad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

HTML

The document discusses HTML tables. It states that tables are defined with <table> tags and contain rows (<tr>) and data cells (<td>). It provides examples of basic tables with one column, one row with multiple columns, and multiple rows with multiple columns. It also demonstrates how to use colspan to make a cell span multiple columns and rowspan to make a cell span multiple rows.

Uploaded by

Mat Jad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

HTML PROGRAMMING

TABLES

MOHD FAHMI MOHAMAD AMRAN


TABLES

 Tables are defined with the <table> tag.


 A table is divided into rows (with the <tr> tag),
and each row is divided into data cells (with
the <td> tag).
 The letters td stands for "table data," which is
the content of a data cell.
 A data cell can contain text, forms, lists,
paragraphs, images, horizontal rules, tables,
etc.
MOHD FAHMI MOHAMAD AMRAN
One Column
<html>
<head></head>
<body> How it looks in a browser:
<h4>One column:</h4>

<table border="1">

<tr>

   <td>100</td>

</tr>

</table>
</body>
</html>

MOHD FAHMI MOHAMAD AMRAN


One Row and Three Columns
<html>
<head></head>
<body>
How it looks in a browser:
<h4>One row and three columns:</h4>

<table border="1">

<tr>

   <td>100</td>
   <td>200</td>
   <td>300</td>

</tr>

</table>
</body>
</html>

MOHD FAHMI MOHAMAD AMRAN


Two Rows and Three Columns
<html>
<head></head>
<body>
How it looks in a browser:
<h4>Two rows and three columns:</h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
 <td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
 <td>600</td>
</tr>
</table>
</body>
</html>

MOHD FAHMI MOHAMAD AMRAN


COLSPAN & ROWSPAN

MOHD FAHMI MOHAMAD AMRAN


Cell That Spans Two Columns
<html>
<head></head>
<body>
How it looks in a browser:
<h4>Cell that spans two columns:</h4>
<table border="1">

<tr>
  <th>Name</th>
<th colspan="2">Telephone</th>
</tr>

<tr>
<td>Bill Gates</td>
<td>555 77 854</td>
  <td>555 77 855</td>
</tr>

</table>
</body>
</html>

MOHD FAHMI MOHAMAD AMRAN


Two Rows and Three Columns:
<html>
<head></head>
<body>
How it looks in a browser:
<h4>Cell that spans two rows:</h4>
<table border="1">

<tr>
<th>First Name:</th>
<td>Bill Gates</td>
</tr>

<tr>
   <th rowspan="2">Telephone:</th>
   <td>555 77 854</td>
</tr>

<tr>
  <td>555 77 855</td>
</tr>
</table>
</body>
</html>

MOHD FAHMI MOHAMAD AMRAN

You might also like