Home / Programming / add a table using html basic

add a table using html basic

Spread the love

Use the HTML (HyperText Markup Language) <table> element to define a table. Use the HTML <tr> element to define a table row. add a table using html basic …Use the HTML <td> element to define a table data. Use the HTML <th> element to define a table heading. Use the HTML <caption> element to define a table caption. HTML.

 

<html>
<head>
<title>My First Table</title>
</head>
<body style=”background-image:url(background.jpg)”>
<table bgcolor=”black” border=”2″ color=”black”width=”70%”height=”100″align=”center”>
<thead>
<tr bgcolor=”red”>
<td >Name</td><td>Father’s Name</td><td>Age</td>
</tr>

</thead>

<tbody bgcolor=”white”>
<tr >
<td>Name 1</td>
<td>Father Name </td>
<td>20 yrs</td>

</tr>

<tr>
<td>Name 2</td>
<td>Father Name</td>
<td>19 yrs</td>

</tr>

<tr>
<td>Name 3</td>
<td>Father Name</td>
<td>19 yrs</td>

</tr>

<tr>
<td>Name 4</td>
<td>Father Name</td>
<td>18 yrs</td>

 

 

 

Use the HTML (HyperText Markup Language) <table> element to define a table. Use the HTML <tr> element to define a table row. add a table using html basic …Use the HTML <td> element to define a table data. Use the HTML <th> element to define a table heading. Use the HTML <caption> element to define a table caption. HTML.

 

Table looks like this :-

 

Summery

 

  • Use the HTML <table> element to define a table
  • Use the HTML <tr> element to define a table row
  • Use the HTML <td> element to define a table data
  • Use the HTML <th> element to define a table heading
  • Use the HTML <caption> element to define a table caption
  • Use the CSS border property to define a border
  • Use the CSS border-collapse property to collapse cell borders
  • Use the CSS padding property to add padding to cells
  • Use the CSS text-align property to align cell text
  • Use the CSS border-spacing property to set the spacing between cells
  • Use the colspan attribute to make a cell span many columns
  • Use the rowspan attribute to make a cell span many rows
  • Use the id attribute to uniquely define one table

Each table row is defined with the <tr> tag. A table header is defined with the <th> tag. By default, table headings are bold and centered. A table data/cell is defined with the <td> tag.

About Arslan Hafeez

I am a programmer and the student of Computer Sciences. I am is expert in programming and technical problem solving. I am DataBase Manager on theteknek.com.

Check Also

Program that Find Multiplication of Two Numbers in Java

Program that Find Multiplication of Two Numbers in Java

Spread the loveProgram that Find Multiplication of Two Numbers in Java. This will give you …

Leave a Reply

%d bloggers like this:
Skip to toolbar