SlideShare a Scribd company logo
1 of 9
HTML Tables
HTML Tables
(SAMPLE ONLY)

Apple           44%


Bananas         23%


Oranges         13%


Others          10%
HTML Tables
• Tables are defined with the <table> tag.
• A table is divided into rows (with the <tr> tag), and
  each row is divided into data cells (with the <td>
  tag). td stands for "table data," and holds the content
  of a data cell. A <td> tag can contain text, links,
  images, lists, forms, other tables, etc.
Table Example
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
Continuing the Table Example
How the HTML code above looks in a browser:
row 1, cell 1              row 1, cell 2


row 2, cell 1              row 2, cell 2
HTML Tables and the Border Attribute
• If you do not specify a border attribute, the table will
  be displayed without borders. Sometimes this can be
  useful, but most of the time, we want the borders to
  show.
• To display a table with borders, specify the border
  attribute:
<table border="1">
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>
HTML Table Headers
• Header information in a table are defined with the <th> tag.
• All major browsers will display the text in the <th> element as
  bold and centered.
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
Continuing the HTML Table Headers

How the HTML code above looks in your browser:
 Header 1                   Header 2

 row 1, cell 1              row 1, cell 2

 row 2, cell 1              row 2, cell 2
HTML Table Tags
      Tag          Description
      <table>      Defines a table
      <th>         Defines a table header
      <tr>         Defines a table row
      <td>         Defines a table cell
      <caption>    Defines a table caption
      <colgroup>   Defines a group of columns
                   in a table, for formatting

      <col />      Defines attribute values for
                   one or more columns in a
                   table
      <thead>      Groups the header content
                   in a table
      <tbody>      Groups the body content in a
                   table
      <tfoot>      Groups the footer content in
                   a table

More Related Content

What's hot (19)

Html table tags
Html table tagsHtml table tags
Html table tags
 
Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
 
html-table
html-tablehtml-table
html-table
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
Web I - 03 - Tables
Web I - 03 - TablesWeb I - 03 - Tables
Web I - 03 - Tables
 
HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
 
Computer language - Html tables
Computer language - Html tablesComputer language - Html tables
Computer language - Html tables
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 
Web forms and html lecture Number 3
Web forms and html lecture Number 3Web forms and html lecture Number 3
Web forms and html lecture Number 3
 
HTML Tables in Omeka
HTML Tables in OmekaHTML Tables in Omeka
HTML Tables in Omeka
 
Html
HtmlHtml
Html
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al Baset
 
Html5 cheat sheet
Html5 cheat sheetHtml5 cheat sheet
Html5 cheat sheet
 
Web technology lab manual
Web technology lab manualWeb technology lab manual
Web technology lab manual
 
Lect# 1 html part ii
Lect# 1 html part iiLect# 1 html part ii
Lect# 1 html part ii
 

Viewers also liked

Media digipak analysis rihanna
Media digipak analysis rihannaMedia digipak analysis rihanna
Media digipak analysis rihannatottenhamboy5
 
Magento extension-developers-guide-v1.0
Magento extension-developers-guide-v1.0Magento extension-developers-guide-v1.0
Magento extension-developers-guide-v1.0Santosh Yadav
 
Introduction to cis107 fall 2012
Introduction to cis107 fall 2012Introduction to cis107 fall 2012
Introduction to cis107 fall 2012jgardne4
 
Lines by Julia Kim and Max Gold
Lines by Julia Kim and Max Gold Lines by Julia Kim and Max Gold
Lines by Julia Kim and Max Gold Juliaakim
 
Digital Business: Video Conferencing
Digital Business: Video ConferencingDigital Business: Video Conferencing
Digital Business: Video ConferencingDigital Business
 
Comics and health education un’opportunità per promuovere la salute
Comics and health education  un’opportunità per promuovere la salute Comics and health education  un’opportunità per promuovere la salute
Comics and health education un’opportunità per promuovere la salute Giuseppe Fattori
 
Esquerda sobre la LOMCE
Esquerda sobre la LOMCEEsquerda sobre la LOMCE
Esquerda sobre la LOMCEEnsenyament
 
Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014
Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014
Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014Eleni Papadopoulou
 
PICMET2012 Conference / Tero Peltola
PICMET2012 Conference / Tero PeltolaPICMET2012 Conference / Tero Peltola
PICMET2012 Conference / Tero PeltolaTero Peltola
 
Components of Computer
Components of ComputerComponents of Computer
Components of ComputerQsrealm
 

Viewers also liked (20)

HTML practicals
HTML practicals HTML practicals
HTML practicals
 
Юзеф Игнаци Крашевский
Юзеф Игнаци КрашевскийЮзеф Игнаци Крашевский
Юзеф Игнаци Крашевский
 
Media digipak analysis rihanna
Media digipak analysis rihannaMedia digipak analysis rihanna
Media digipak analysis rihanna
 
Pertemuan2
Pertemuan2Pertemuan2
Pertemuan2
 
Magento extension-developers-guide-v1.0
Magento extension-developers-guide-v1.0Magento extension-developers-guide-v1.0
Magento extension-developers-guide-v1.0
 
Office
OfficeOffice
Office
 
Introduction to cis107 fall 2012
Introduction to cis107 fall 2012Introduction to cis107 fall 2012
Introduction to cis107 fall 2012
 
Lines by Julia Kim and Max Gold
Lines by Julia Kim and Max Gold Lines by Julia Kim and Max Gold
Lines by Julia Kim and Max Gold
 
Digital Business: Video Conferencing
Digital Business: Video ConferencingDigital Business: Video Conferencing
Digital Business: Video Conferencing
 
Мінск губернскі (1793-1921)
Мінск губернскі (1793-1921)Мінск губернскі (1793-1921)
Мінск губернскі (1793-1921)
 
Module edc
Module edcModule edc
Module edc
 
Pertemuan 12
Pertemuan 12Pertemuan 12
Pertemuan 12
 
Древние города земли русской
Древние города земли русскойДревние города земли русской
Древние города земли русской
 
Длиннее, короче
Длиннее, корочеДлиннее, короче
Длиннее, короче
 
Comics and health education un’opportunità per promuovere la salute
Comics and health education  un’opportunità per promuovere la salute Comics and health education  un’opportunità per promuovere la salute
Comics and health education un’opportunità per promuovere la salute
 
Esquerda sobre la LOMCE
Esquerda sobre la LOMCEEsquerda sobre la LOMCE
Esquerda sobre la LOMCE
 
Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014
Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014
Exetastea didaktea ili_panelladika_exetazomenon_mathimatwn_g_lykeiou_2013_2014
 
Orfeo
OrfeoOrfeo
Orfeo
 
PICMET2012 Conference / Tero Peltola
PICMET2012 Conference / Tero PeltolaPICMET2012 Conference / Tero Peltola
PICMET2012 Conference / Tero Peltola
 
Components of Computer
Components of ComputerComponents of Computer
Components of Computer
 

Similar to HTML Tables

Similar to HTML Tables (20)

v4-html-table-210321161424.pptx
v4-html-table-210321161424.pptxv4-html-table-210321161424.pptx
v4-html-table-210321161424.pptx
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
HTML Tables.ppt
HTML Tables.pptHTML Tables.ppt
HTML Tables.ppt
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
 
Lecture-4.pptx
Lecture-4.pptxLecture-4.pptx
Lecture-4.pptx
 
Html tables
Html tablesHtml tables
Html tables
 
01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx
 
Handout5 tables
Handout5 tablesHandout5 tables
Handout5 tables
 
WEP4 and 5.pptx
WEP4 and 5.pptxWEP4 and 5.pptx
WEP4 and 5.pptx
 
Web html table tags
Web html  table tagsWeb html  table tags
Web html table tags
 
HTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by MukeshHTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by Mukesh
 
HTML
HTMLHTML
HTML
 
Lecture 2.ppt
Lecture 2.pptLecture 2.ppt
Lecture 2.ppt
 
Lecture 5 html table
Lecture 5 html tableLecture 5 html table
Lecture 5 html table
 
Response Tables.ppt
Response Tables.pptResponse Tables.ppt
Response Tables.ppt
 
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
RDBMS oracle function RDBMSRDBMSRDBMS.pptxRDBMS oracle function RDBMSRDBMSRDBMS.pptx
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
 
Presentation (2).pptx
Presentation (2).pptxPresentation (2).pptx
Presentation (2).pptx
 
HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2
 
HTML
HTMLHTML
HTML
 
Working With Tables in HTML
Working With Tables in HTMLWorking With Tables in HTML
Working With Tables in HTML
 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
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
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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
 

HTML Tables

  • 2. HTML Tables (SAMPLE ONLY) Apple 44% Bananas 23% Oranges 13% Others 10%
  • 3. HTML Tables • Tables are defined with the <table> tag. • A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain text, links, images, lists, forms, other tables, etc.
  • 4. Table Example <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
  • 5. Continuing the Table Example How the HTML code above looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
  • 6. HTML Tables and the Border Attribute • If you do not specify a border attribute, the table will be displayed without borders. Sometimes this can be useful, but most of the time, we want the borders to show. • To display a table with borders, specify the border attribute: <table border="1"> <tr> <td>Row 1, cell 1</td> <td>Row 1, cell 2</td> </tr> </table>
  • 7. HTML Table Headers • Header information in a table are defined with the <th> tag. • All major browsers will display the text in the <th> element as bold and centered. <table border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
  • 8. Continuing the HTML Table Headers How the HTML code above looks in your browser: Header 1 Header 2 row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
  • 9. HTML Table Tags Tag Description <table> Defines a table <th> Defines a table header <tr> Defines a table row <td> Defines a table cell <caption> Defines a table caption <colgroup> Defines a group of columns in a table, for formatting <col /> Defines attribute values for one or more columns in a table <thead> Groups the header content in a table <tbody> Groups the body content in a table <tfoot> Groups the footer content in a table