SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à HTML Tables

Similaire à 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
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

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