Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator

HTML <table> Tag

HTML <table> tag define a table. It's have a row or column to built a table.

This is the best way to split a web page into different sections using table.


<table align="center" border = "1" cellpadding="5" cellpadding="5" 
width="350px" height="100px" bgcolor="yellow" bordercolor="#CCCC66">
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
<td>Cell 4</td>
Online Try This Code Your Self....   »


Cell 1 Cell 2
Cell 3 Cell 4

<table> Attributes

Attributes Value Description
align Left,Right,Center Declared your alignment side.
width "Size_px" Specify the Width Size of the Table.
height "Size_px" Specify the Height Size of the Table.
bgcolor "purple" Specify the Background Color.
background "Specified_URL" Specify the Background Image open for URL file.
border "Size_px" Specify the size of border thickness.
bordercolor "Yellow" Specify the color of border.
cellspacing "Size_px" Specify the space between two Cell.
cellpadding "Size_px" Specify the space between cell boundary and text.

Dynamic Attributes

<table> tag supported following Dynamic attributes.:

Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Event Attributes

<table> tag supported following Event attributes.:

Attributes Value Description
onclick "Java_script" clicked on object when script tobe run.
ondblclick "Java_script" double click on object when script tobe run.
onkeydown "Java_script" key is pressed when script tobe run.
onkeypress "Java_script" key is pressed over element then released when script tobe run.
onkeyup "Java_script" key is released over element when script tobe run.
onmousedown "Java_script" mouse button was pressed over an element when script tobe run.
onmouseout "Java_script" mouse pointer release over an element when script tobe run.
onmousemove "Java_script" run mouse pointer moved when script tobe run.
onmouseover "Java_script" run mouse pointer move over when script tobe run.
onmouseup "Java_script" mouse button is released when script tobe run.