SlideShare a Scribd company logo
1 of 13
Working with HTML Tables <table>, <th>, <tr> and <td> tags
Template <table border=1> 	<caption> Table Caption</caption> 	<tr> 	<th> Heading 1</th> 	<th> Heading 2</th> </tr> <tr> 	<td>Row1 Col1 Data</td> 	<td>Row1 Col2 Data</td> </tr> 	<tr> 		<td>Row1 Col1 Data</td> 		<td>Row1 Col2 Data</td> 	</tr> 	<tr> 		<td>Row1 Col1 Data</td> 		<td>Row1 Col2 Data</td> 	</tr>
Table Element Attribute Align: -gives the horizontal alignment of the table as a whole -Legal Values are: Left, right and center, with left being its default Border: ,[object Object]
The Default is zero, which also results in the visible 3D divider between cells being turned off,[object Object]
Default is usually about 3Cellpadding: -determines the empty space, in pixels, between the cell’s border and the table element. - Default is usually by 1
Width: ,[object Object],BGColor: ,[object Object],Background: -nonstandard attribute supported by IE gives an image file that will be tiled as the background of the table. Frame: ,[object Object]
All four are drawn if this attribute is omitted
Legal Values are Border or Box(all), VOID(none), Above(top),bellow(bottom), Hsides(top and bottom), Vsides(left and right), LHS(left) and RHS(right)
<TR> Table Row ,[object Object]
Each row will contain TH and/or TD entried,[object Object]
Table Cells: <TH> and <TD> Colspan: ,[object Object],<Table Border=1> <tr> 	<thColspan=2> Col 1 & 2 Heading</th> 	<th> Col3 Heading</th> </tr> <tr> 	<td> Col1 data</td> 	 <td> Col2 data</td> 	 <td> Col3 data</td> </tr> </table>

More Related Content

What's hot

What's hot (15)

Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
3.1 xhtml tables
3.1 xhtml tables3.1 xhtml tables
3.1 xhtml tables
 
Html Tables
Html TablesHtml Tables
Html Tables
 
html-table
html-tablehtml-table
html-table
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
 
Web design - Working with tables in HTML
Web design - Working with tables in HTMLWeb design - Working with tables in HTML
Web design - Working with tables in HTML
 
Standard Grade Administration - Software Applications
Standard Grade Administration - Software ApplicationsStandard Grade Administration - Software Applications
Standard Grade Administration - Software Applications
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
1-06: More HTML Elements
1-06: More HTML Elements1-06: More HTML Elements
1-06: More HTML Elements
 
Computer language - Html tables
Computer language - Html tablesComputer language - Html tables
Computer language - Html tables
 
Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
 
Create table relationships
Create table relationshipsCreate table relationships
Create table relationships
 
Documents and formatting
Documents and formattingDocuments and formatting
Documents and formatting
 
HTML + CSS
HTML + CSSHTML + CSS
HTML + CSS
 
HTML Basic
HTML BasicHTML Basic
HTML Basic
 

Viewers also liked

Viewers also liked (6)

Netiquette
NetiquetteNetiquette
Netiquette
 
Working with tables
Working with tablesWorking with tables
Working with tables
 
Html links
Html linksHtml links
Html links
 
Imagetag
ImagetagImagetag
Imagetag
 
Css intro
Css introCss intro
Css intro
 
Netiquette
NetiquetteNetiquette
Netiquette
 

Similar to Working with html tables (20)

Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Tables
TablesTables
Tables
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Tables
TablesTables
Tables
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
1 06-more html-elements
1 06-more html-elements1 06-more html-elements
1 06-more html-elements
 
Tables
TablesTables
Tables
 
Understanding THML
Understanding THMLUnderstanding THML
Understanding THML
 
03. session 03 using lists and tables
03. session 03   using lists and tables03. session 03   using lists and tables
03. session 03 using lists and tables
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Chapter 3 class presentation
Chapter 3 class presentationChapter 3 class presentation
Chapter 3 class presentation
 
Tables overview 2010
Tables overview 2010Tables overview 2010
Tables overview 2010
 
Kml Basics Chpt 2 Placemarks
Kml Basics Chpt  2   PlacemarksKml Basics Chpt  2   Placemarks
Kml Basics Chpt 2 Placemarks
 
Html intro
Html introHtml intro
Html intro
 
Html intro
Html introHtml intro
Html intro
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
AK html
AK  htmlAK  html
AK html
 

Working with html tables

  • 1. Working with HTML Tables <table>, <th>, <tr> and <td> tags
  • 2. Template <table border=1> <caption> Table Caption</caption> <tr> <th> Heading 1</th> <th> Heading 2</th> </tr> <tr> <td>Row1 Col1 Data</td> <td>Row1 Col2 Data</td> </tr> <tr> <td>Row1 Col1 Data</td> <td>Row1 Col2 Data</td> </tr> <tr> <td>Row1 Col1 Data</td> <td>Row1 Col2 Data</td> </tr>
  • 3.
  • 4.
  • 5.
  • 6. Default is usually about 3Cellpadding: -determines the empty space, in pixels, between the cell’s border and the table element. - Default is usually by 1
  • 7.
  • 8. All four are drawn if this attribute is omitted
  • 9. Legal Values are Border or Box(all), VOID(none), Above(top),bellow(bottom), Hsides(top and bottom), Vsides(left and right), LHS(left) and RHS(right)
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Sample 1 <TABLE BORDER="1"> <TR> <TD WIDTH="25">A</TD> <TD WIDTH="25" align=center>B</TD> <TD WIDTH="25" align=right>C</TD> </TR> <TR> <TD WIDTH="25">D</TD> <TD WIDTH="25" align=center>E</TD> <TD WIDTH="25" align=right>F</TD> </TR> </TABLE>