SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
www.eshikshak.co.in
Tables are very useful to arrange in HTML
and they are used very frequently by almost all
web developers.
 Tables are just like spreadsheets and they are
made up of rows and columns.
Create a table in HTML/XHTML by using
<table> tag.


          www.eshikshak.co.in
www.eshikshak.co.in
Table heading can be defined using <th>
element.
This tag will be put to replace <td> tag which
is used to represent actual data.




          www.eshikshak.co.in
www.eshikshak.co.in
There are two attributes called cell padding
and cell spacing which you will use to adjust
the white space in your table cell..
Cell spacing defines the width of the border.
While cell padding represents the distance
between cell borders and the content within.



          www.eshikshak.co.in
<table border="1" cellpadding="5"
cellspacing="5">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>                                                  Name            Salary
<tr>                                          Ramesh Raman      5000
<td>Prakash Khaire</td>
                                              Shabbir Hussein   7000
<td>5000</td>
</tr>
<tr>
<td>Hardik Vyas</td>
<td>7000</td>
</tr>
</table>


                        www.eshikshak.co.in
Use colspan attribute if you want to merge
two or more columns into a single column.
Use rowspan if you want to merge two or
more rows.




         www.eshikshak.co.in
<table border="1">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>                         Column 1 Column 2 Column 3
</tr>                                    Row 1 Cell Row 1 Cell Row 1 Cell
<tr><td rowspan="2">Row 1 Cell           1            2
                                                      Row 2 Cell 3
                                                                 Row 2 Cell
1</td>                                   Row 3 Cell 1 2          3
<td>Row 1 Cell 2</td><td>Row 1 Cell
3</td></tr>
<tr><td>Row 2 Cell 2</td><td>Row 2
Cell 3</td></tr>
<tr><td colspan="3">Row 3 Cell
1</td></tr>
</table>


                   www.eshikshak.co.in
Set table background using of the following
two ways:
 Using bgcolor attribute - You can set background
  color for whole table or just for one cell.
 Using background attribute - You can set
  background image for whole table or just for one
  cell.



           www.eshikshak.co.in
<table border="5" bordercolor="green" bgcolor="gray">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
                                                                 Column 1 Column 2 Column 3
</tr>
<tr><td rowspan="2">Row 1 Cell 1</td>                           Row 1 Cell 1 Row 1 Cell 2 Row 1 Cell 3
<td bgcolor="red">Row 1 Cell 2</td><td>Row 1 Cell 3</td></tr>                Row 2 Cell 2 Row 2 Cell 3
<tr><td>Row 2 Cell 2</td><td>Row 2 Cell 3</td></tr>             Row 3 Cell 1
<tr><td colspan="3">Row 3 Cell 1</td></tr>
</table>




                             www.eshikshak.co.in
set a table width and height using width and
height attributes.
You can specify table width or height in terms
of integer value or in terms of percentage of
available screen area.




          www.eshikshak.co.in
<table border="1" width="400" height="
150">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>                  Row 1, Column 1   Row 1, Column 2
</tr>                                     Row 2, Column 1   Row 2, Column 2
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>


                    www.eshikshak.co.in
The caption tags will serve as a title or
 explanation and show up at the top of the
 table.
<table border="1">
<caption>This is the
caption</caption>                          This is the caption
<tr>                                   row 1,        row 1,
<td>row 1, column 1</td>               column 1      columnn 2
<td>row 1, columnn 2</td>
</tr>
</table>

                 www.eshikshak.co.in
Tables can be divided into three portions:
 a header
 a body
 a foot
The head and foot are rather similar to headers
and footers in a word-processed document that
remain the same for every page, while the
body is the main content of the table.

             www.eshikshak.co.in
The three elements for separating the head,
body, and foot of a table are:
 <thead> - to create a separate table header.
 <tbody> - to indicate the main body of the table.
 <tfoot> - to create a separate table footer.




            www.eshikshak.co.in
<table border="1" width="100%">
<thead>
<tr>
<td colspan="4">This is the head of the table</td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4">This is the foot of the table</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
...more rows here containing four cells...
</tr>
</tbody>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
...more rows here containing four cells...
</tr>
</tbody>
</table>


         www.eshikshak.co.in
This is the head of the table
This is the foot of the table
Cell 1                     Cell 2
...more rows here containing four cells...
Cell 1                     Cell 2
...more rows here containing four cells...




   www.eshikshak.co.in

Más contenido relacionado

La actualidad más candente (20)

Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
 
Id and class selector
Id and class selectorId and class selector
Id and class selector
 
HTML Text formatting tags
HTML Text formatting tagsHTML Text formatting tags
HTML Text formatting tags
 
CSS
CSSCSS
CSS
 
Html table
Html tableHtml table
Html table
 
Anchor tag HTML Presentation
Anchor tag HTML PresentationAnchor tag HTML Presentation
Anchor tag HTML Presentation
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html forms
Html formsHtml forms
Html forms
 
Html form tag
Html form tagHtml form tag
Html form tag
 
Css selectors
Css selectorsCss selectors
Css selectors
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
Html forms
Html formsHtml forms
Html forms
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
 
html-css
html-csshtml-css
html-css
 
Html basics
Html basicsHtml basics
Html basics
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Basic html structure
Basic html structureBasic html structure
Basic html structure
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 

Similar a Html table tags (20)

Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
 
Web I - 03 - Tables
Web I - 03 - TablesWeb I - 03 - Tables
Web I - 03 - Tables
 
Lecture-4.pptx
Lecture-4.pptxLecture-4.pptx
Lecture-4.pptx
 
v4-html-table-210321161424.pptx
v4-html-table-210321161424.pptxv4-html-table-210321161424.pptx
v4-html-table-210321161424.pptx
 
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
 
Handout5 tables
Handout5 tablesHandout5 tables
Handout5 tables
 
Session3 part2
Session3 part2Session3 part2
Session3 part2
 
HTML 5 Tables and Forms
HTML 5 Tables and FormsHTML 5 Tables and Forms
HTML 5 Tables and Forms
 
01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 
HTML Tables
HTML TablesHTML Tables
HTML Tables
 
HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2
 
Html tables
Html tablesHtml tables
Html tables
 
HTML Tables in Omeka
HTML Tables in OmekaHTML Tables in Omeka
HTML Tables in Omeka
 
Xml and xslt
Xml and xsltXml and xslt
Xml and xslt
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
Lecture 5 html table
Lecture 5 html tableLecture 5 html table
Lecture 5 html table
 
Theme
ThemeTheme
Theme
 
Tables
TablesTables
Tables
 
table html web programing
table  html  web programingtable  html  web programing
table html web programing
 

Más de eShikshak

Modelling and evaluation
Modelling and evaluationModelling and evaluation
Modelling and evaluationeShikshak
 
Operators in python
Operators in pythonOperators in python
Operators in pythoneShikshak
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in pythoneShikshak
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythoneShikshak
 
Introduction to e commerce
Introduction to e commerceIntroduction to e commerce
Introduction to e commerceeShikshak
 
Chapeter 2 introduction to cloud computing
Chapeter 2   introduction to cloud computingChapeter 2   introduction to cloud computing
Chapeter 2 introduction to cloud computingeShikshak
 
Unit 1.4 working of cloud computing
Unit 1.4 working of cloud computingUnit 1.4 working of cloud computing
Unit 1.4 working of cloud computingeShikshak
 
Unit 1.3 types of cloud
Unit 1.3 types of cloudUnit 1.3 types of cloud
Unit 1.3 types of cloudeShikshak
 
Unit 1.2 move to cloud computing
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computingeShikshak
 
Unit 1.1 introduction to cloud computing
Unit 1.1   introduction to cloud computingUnit 1.1   introduction to cloud computing
Unit 1.1 introduction to cloud computingeShikshak
 
Mesics lecture files in 'c'
Mesics lecture   files in 'c'Mesics lecture   files in 'c'
Mesics lecture files in 'c'eShikshak
 
Mesics lecture 8 arrays in 'c'
Mesics lecture 8   arrays in 'c'Mesics lecture 8   arrays in 'c'
Mesics lecture 8 arrays in 'c'eShikshak
 
Mesics lecture 7 iteration and repetitive executions
Mesics lecture 7   iteration and repetitive executionsMesics lecture 7   iteration and repetitive executions
Mesics lecture 7 iteration and repetitive executionseShikshak
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’eShikshak
 
Mesics lecture 6 control statement = if -else if__else
Mesics lecture 6   control statement = if -else if__elseMesics lecture 6   control statement = if -else if__else
Mesics lecture 6 control statement = if -else if__elseeShikshak
 
Mesics lecture 4 c operators and experssions
Mesics lecture  4   c operators and experssionsMesics lecture  4   c operators and experssions
Mesics lecture 4 c operators and experssionseShikshak
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’eShikshak
 
Mesics lecture 3 c – constants and variables
Mesics lecture 3   c – constants and variablesMesics lecture 3   c – constants and variables
Mesics lecture 3 c – constants and variableseShikshak
 
Lecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorsLecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorseShikshak
 
Lecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.pptLecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.ppteShikshak
 

Más de eShikshak (20)

Modelling and evaluation
Modelling and evaluationModelling and evaluation
Modelling and evaluation
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to e commerce
Introduction to e commerceIntroduction to e commerce
Introduction to e commerce
 
Chapeter 2 introduction to cloud computing
Chapeter 2   introduction to cloud computingChapeter 2   introduction to cloud computing
Chapeter 2 introduction to cloud computing
 
Unit 1.4 working of cloud computing
Unit 1.4 working of cloud computingUnit 1.4 working of cloud computing
Unit 1.4 working of cloud computing
 
Unit 1.3 types of cloud
Unit 1.3 types of cloudUnit 1.3 types of cloud
Unit 1.3 types of cloud
 
Unit 1.2 move to cloud computing
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computing
 
Unit 1.1 introduction to cloud computing
Unit 1.1   introduction to cloud computingUnit 1.1   introduction to cloud computing
Unit 1.1 introduction to cloud computing
 
Mesics lecture files in 'c'
Mesics lecture   files in 'c'Mesics lecture   files in 'c'
Mesics lecture files in 'c'
 
Mesics lecture 8 arrays in 'c'
Mesics lecture 8   arrays in 'c'Mesics lecture 8   arrays in 'c'
Mesics lecture 8 arrays in 'c'
 
Mesics lecture 7 iteration and repetitive executions
Mesics lecture 7   iteration and repetitive executionsMesics lecture 7   iteration and repetitive executions
Mesics lecture 7 iteration and repetitive executions
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’
 
Mesics lecture 6 control statement = if -else if__else
Mesics lecture 6   control statement = if -else if__elseMesics lecture 6   control statement = if -else if__else
Mesics lecture 6 control statement = if -else if__else
 
Mesics lecture 4 c operators and experssions
Mesics lecture  4   c operators and experssionsMesics lecture  4   c operators and experssions
Mesics lecture 4 c operators and experssions
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’
 
Mesics lecture 3 c – constants and variables
Mesics lecture 3   c – constants and variablesMesics lecture 3   c – constants and variables
Mesics lecture 3 c – constants and variables
 
Lecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorsLecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operators
 
Lecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.pptLecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.ppt
 

Último

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Html table tags

  • 2. Tables are very useful to arrange in HTML and they are used very frequently by almost all web developers. Tables are just like spreadsheets and they are made up of rows and columns. Create a table in HTML/XHTML by using <table> tag. www.eshikshak.co.in
  • 4. Table heading can be defined using <th> element. This tag will be put to replace <td> tag which is used to represent actual data. www.eshikshak.co.in
  • 6. There are two attributes called cell padding and cell spacing which you will use to adjust the white space in your table cell.. Cell spacing defines the width of the border. While cell padding represents the distance between cell borders and the content within. www.eshikshak.co.in
  • 7. <table border="1" cellpadding="5" cellspacing="5"> <tr> <th>Name</th> <th>Salary</th> </tr> Name Salary <tr> Ramesh Raman 5000 <td>Prakash Khaire</td> Shabbir Hussein 7000 <td>5000</td> </tr> <tr> <td>Hardik Vyas</td> <td>7000</td> </tr> </table> www.eshikshak.co.in
  • 8. Use colspan attribute if you want to merge two or more columns into a single column. Use rowspan if you want to merge two or more rows. www.eshikshak.co.in
  • 9. <table border="1"> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> Column 1 Column 2 Column 3 </tr> Row 1 Cell Row 1 Cell Row 1 Cell <tr><td rowspan="2">Row 1 Cell 1 2 Row 2 Cell 3 Row 2 Cell 1</td> Row 3 Cell 1 2 3 <td>Row 1 Cell 2</td><td>Row 1 Cell 3</td></tr> <tr><td>Row 2 Cell 2</td><td>Row 2 Cell 3</td></tr> <tr><td colspan="3">Row 3 Cell 1</td></tr> </table> www.eshikshak.co.in
  • 10. Set table background using of the following two ways:  Using bgcolor attribute - You can set background color for whole table or just for one cell.  Using background attribute - You can set background image for whole table or just for one cell. www.eshikshak.co.in
  • 11. <table border="5" bordercolor="green" bgcolor="gray"> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> Column 1 Column 2 Column 3 </tr> <tr><td rowspan="2">Row 1 Cell 1</td> Row 1 Cell 1 Row 1 Cell 2 Row 1 Cell 3 <td bgcolor="red">Row 1 Cell 2</td><td>Row 1 Cell 3</td></tr> Row 2 Cell 2 Row 2 Cell 3 <tr><td>Row 2 Cell 2</td><td>Row 2 Cell 3</td></tr> Row 3 Cell 1 <tr><td colspan="3">Row 3 Cell 1</td></tr> </table> www.eshikshak.co.in
  • 12. set a table width and height using width and height attributes. You can specify table width or height in terms of integer value or in terms of percentage of available screen area. www.eshikshak.co.in
  • 13. <table border="1" width="400" height=" 150"> <tr> <td>Row 1, Column 1</td> <td>Row 1, Column 2</td> Row 1, Column 1 Row 1, Column 2 </tr> Row 2, Column 1 Row 2, Column 2 <tr> <td>Row 2, Column 1</td> <td>Row 2, Column 2</td> </tr> </table> www.eshikshak.co.in
  • 14. The caption tags will serve as a title or explanation and show up at the top of the table. <table border="1"> <caption>This is the caption</caption> This is the caption <tr> row 1, row 1, <td>row 1, column 1</td> column 1 columnn 2 <td>row 1, columnn 2</td> </tr> </table> www.eshikshak.co.in
  • 15. Tables can be divided into three portions:  a header  a body  a foot The head and foot are rather similar to headers and footers in a word-processed document that remain the same for every page, while the body is the main content of the table. www.eshikshak.co.in
  • 16. The three elements for separating the head, body, and foot of a table are:  <thead> - to create a separate table header.  <tbody> - to indicate the main body of the table.  <tfoot> - to create a separate table footer. www.eshikshak.co.in
  • 17. <table border="1" width="100%"> <thead> <tr> <td colspan="4">This is the head of the table</td> </tr> </thead> <tfoot> <tr> <td colspan="4">This is the foot of the table</td> </tr> </tfoot> <tbody> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> <tr> ...more rows here containing four cells... </tr> </tbody> <tbody> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> <tr> ...more rows here containing four cells... </tr> </tbody> </table> www.eshikshak.co.in
  • 18. This is the head of the table This is the foot of the table Cell 1 Cell 2 ...more rows here containing four cells... Cell 1 Cell 2 ...more rows here containing four cells... www.eshikshak.co.in