Home Html Table & the Border attribute

Related Tutorials


 
 

Share on Google+Share on Google+

Table & the Border attribute

Advertisement
The Tutorial illustrates an example from Table and the Border attribute. In this Tutorial, the code explains to create a table and the border with a specified attribute.

Table & the Border attribute

     

The Tutorial illustrates an example from Table and the Border attribute. In this Tutorial, the code explains to create a table and the border with a specified attribute.

Understand with Example

To create a table in HTML, the <table> tag is used. In the <table> tag, the value of the border has to be specified. A table is sub-divided into table rows(tr) and then into table data(td).

<tr>: This is used to define a row in the table.

<td>: This is used to define a cell in your table.

The code is saved with .html extension and paste the path of html code into url of your supporting browser.


<table border="1">

<tr>
<td>data1</td>
<td>data2</td>
</tr>

<tr>
<td>data3</td>
<td>data4</td>
</tr>
<tr>
<td>data5</td>
<td>data6</td>

</table>

On execution, the web browser will evaluate the above code as:

data1 data2
data3 data4
data5 data6

Download

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 3, 2008

Related Tutorials

Discuss: Table & the Border attribute  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:2
Spriyan
October 29, 2012
HTML

display cell content in alertbox on clicking cells in table with html script...........
Spriyan
October 29, 2012
HTML

Hi, i m working on html script for table but i m unable to display the cell value availble in table. i want to display cell content in alertbox on clicking the cells of table . can any one help me plz...........
DMCA.com