SlideShare a Scribd company logo
4
Most read
7
Most read
8
Most read
COMPUTER APPLICATIONS
CLASS X (Code 165)
TOPIC:
UNIT 2: HTML Tables
By
HIMANSHU PATHAK
Contents
• Introduction
• Basic HTML Table Tags
• Table Attributes
Introduction
• HTML tables allow web developers to arrange
data into rows and columns.
• HTML tables are used to manage the layout of
the page e.g. header section, navigation bar,
body content, footer section etc.
• Tables can be used to compare two or more
items in tabular form layout.
• Tables are used to create databases.
Defining Tables in HTML
• An HTML table is defined with the “table” tag.
• Each table row is defined with the “tr” tag.
• A table header is defined with the “th” tag.
• By default, table headings are bold and
centered.
• A table data/cell is defined with the “td” tag.
• The ”caption” tag will serve as a title or
explanation for the table and it shows up at
the top of the table.
Example
<table>
<tr>
<th>Name</th>
<th>Contact</th>
</tr>
<tr>
<td>Pathak</td>
<td>9988776655</td>
</tr>
</table>
Table Tag Attribute
• Border attribute: We can use border attribute
of table tag in HTML to specify border. But it is
not recommended now.
– <table border="1">
• If you do not need a border, then you can use
border = "0".
Cellspacing & Cellpadding
• There are two attributes called cellspacing and
cellpadding which will use to adjust the white
space in table cells.
• The cellspacing attribute defines space
between table cells.
• cellpadding represents the distance between
cell borders and the content within a cell.
– <table cellpadding = "5" cellspacing = "5">
Colspan & Rowspan
• We will use colspan
attribute if we want to
merge two or more
columns into a single
column.
• Similar way we will
use rowspan if we want
to merge two or more
rows.
<table border = "1">
<tr>
<th>Period 1</th>
<th>Period 2</th>
<th>Period 3</th>
</tr>
<tr>
<td rowspan = "2"> Python
</td>
<td>HTML</td>
<td>Computer</td>
</tr>
<tr>
<td>Computer</td>
<td>HTML</td>
</tr>
<tr>
<td colspan = “2”>Python Lab</td>
<td>Library</td>
</tr>
</table>
Tables Background
• bgcolor attribute − We can set
background color for whole table
or just for one cell.
• background attribute − We can
set background image for whole
table or just for one cell.
• We can also set border color also
using bordercolor attribute.
• Note − The bgcolor, background,
and bordercolor attributes
deprecated in HTML5.
<table border = "1“ bordercolor = “red" bgcolor
= "yellow">
<tr>
<th>Period 1</th>
<th>Period 2</th>
<th>Period 3</th>
</tr>
<tr>
<td rowspan = "2"> Python
</td>
<td>HTML</td>
<td>Computer</td>
</tr>
<tr>
<td>Computer</td>
<td>HTML</td>
</tr>
<tr>
<td colspan = “2">Python Lab</td>
<td>Library</td>
</tr>
</table>
Table Height & Width
• You can set a table
width and height
using width and height
attributes.
• You can specify table
width or height in
terms of pixels or in
terms of percentage of
available screen area.
<table border = "1" width = “400” height = “200” >
<tr>
<th>Period 1</th>
<th>Period 2</th>
<th>Period 3</th>
</tr>
<tr>
<td rowspan = "2"> Python
</td>
<td>HTML</td>
<td>Computer</td>
</tr>
<tr>
<td>Computer</td>
<td>HTML</td>
</tr>
<tr>
<td colspan = “2">Python Lab</td>
<td>Library</td>
</tr>
</table>
Summary
• HTML Table
• Table Defining Tags and their attributes
• In the next class, we will start Unit II – HTML
Forms in detail.
•Thanks

More Related Content

PDF
CSS Day: CSS Grid Layout
PDF
Html table tags
PPTX
Basic HTML
PPTX
Html n CSS
PPTX
html-table
PPTX
Css Text Formatting
PPTX
Html links
CSS Day: CSS Grid Layout
Html table tags
Basic HTML
Html n CSS
html-table
Css Text Formatting
Html links

What's hot (20)

PPTX
Html form tag
ODP
CSS Basics
PDF
Html text and formatting
PPTX
Html notes with Examples
PPTX
Html images syntax
PPTX
Html images
PPTX
Web design - Working with tables in HTML
PPTX
PPT
Cascading Style Sheets (CSS) help
PPSX
Html introduction
PPTX
HTML Text formatting tags
PDF
Html / CSS Presentation
PPTX
Html table
PPT
Intro Html
PPT
Learning HTML
PPT
CSS Basics
PPTX
PPTX
HTML: Tables and Forms
PDF
Div tag presentation
Html form tag
CSS Basics
Html text and formatting
Html notes with Examples
Html images syntax
Html images
Web design - Working with tables in HTML
Cascading Style Sheets (CSS) help
Html introduction
HTML Text formatting tags
Html / CSS Presentation
Html table
Intro Html
Learning HTML
CSS Basics
HTML: Tables and Forms
Div tag presentation
Ad

Similar to Html tables (20)

PPTX
Table structure introduction
DOC
Handout5 tables
PPTX
Table in MS Frontpage 2003
PDF
HTML Lecture Part 2 of 2
PPTX
Method of creating table using HTML.pptx
PPT
HTML Tables.ppt
PPSX
Computer language - Html tables
PPTX
WEP4 and 5.pptx
PDF
Web I - 03 - Tables
PDF
HTML (Table and Multimedia): Understanding Web Development Essentials
PPTX
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
ODP
Html tut 04
PDF
Html tables
PPTX
HTML Tables in Omeka
PPTX
Std 10 Computer Chapter 4 List and Table Handling in HTML (Part 2 Table in HTML)
PPTX
htmltables-180721142906-1.pptx
PPTX
Tables
PPTX
PPT
HTML 5 Tables and Forms
PDF
Chapterrrrrrrrrrr_10_Building Tables.pdf
Table structure introduction
Handout5 tables
Table in MS Frontpage 2003
HTML Lecture Part 2 of 2
Method of creating table using HTML.pptx
HTML Tables.ppt
Computer language - Html tables
WEP4 and 5.pptx
Web I - 03 - Tables
HTML (Table and Multimedia): Understanding Web Development Essentials
RDBMS oracle function RDBMSRDBMSRDBMS.pptx
Html tut 04
Html tables
HTML Tables in Omeka
Std 10 Computer Chapter 4 List and Table Handling in HTML (Part 2 Table in HTML)
htmltables-180721142906-1.pptx
Tables
HTML 5 Tables and Forms
Chapterrrrrrrrrrr_10_Building Tables.pdf
Ad

More from Himanshu Pathak (17)

PPTX
Introduction to E commerce
PPTX
Digital property rights
PPTX
Intellectual property rights
PPTX
An Introduction to Cyber Ethics
PPTX
Cascading style sheet part 2
PPTX
Cascading style sheet an introduction
PPTX
Html multimedia
PPTX
Html forms
PPTX
Html link and list tags
PPTX
Basic html tags
PPTX
Introduction to html
PPTX
Mobile technologies
PPTX
Web services
PPTX
Remote Login and File Transfer Protocols
PPTX
Internet protocol
PPTX
Introduction to internet
PPTX
What is Computer?
Introduction to E commerce
Digital property rights
Intellectual property rights
An Introduction to Cyber Ethics
Cascading style sheet part 2
Cascading style sheet an introduction
Html multimedia
Html forms
Html link and list tags
Basic html tags
Introduction to html
Mobile technologies
Web services
Remote Login and File Transfer Protocols
Internet protocol
Introduction to internet
What is Computer?

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
master seminar digital applications in india
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pre independence Education in Inndia.pdf
Microbial diseases, their pathogenesis and prophylaxis
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Classroom Observation Tools for Teachers
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
human mycosis Human fungal infections are called human mycosis..pptx
master seminar digital applications in india
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Module 4: Burden of Disease Tutorial Slides S2 2025
2.FourierTransform-ShortQuestionswithAnswers.pdf
Complications of Minimal Access Surgery at WLH
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Abdominal Access Techniques with Prof. Dr. R K Mishra

Html tables

  • 1. COMPUTER APPLICATIONS CLASS X (Code 165) TOPIC: UNIT 2: HTML Tables By HIMANSHU PATHAK
  • 2. Contents • Introduction • Basic HTML Table Tags • Table Attributes
  • 3. Introduction • HTML tables allow web developers to arrange data into rows and columns. • HTML tables are used to manage the layout of the page e.g. header section, navigation bar, body content, footer section etc. • Tables can be used to compare two or more items in tabular form layout. • Tables are used to create databases.
  • 4. Defining Tables in HTML • An HTML table is defined with the “table” tag. • Each table row is defined with the “tr” tag. • A table header is defined with the “th” tag. • By default, table headings are bold and centered. • A table data/cell is defined with the “td” tag. • The ”caption” tag will serve as a title or explanation for the table and it shows up at the top of the table.
  • 6. Table Tag Attribute • Border attribute: We can use border attribute of table tag in HTML to specify border. But it is not recommended now. – <table border="1"> • If you do not need a border, then you can use border = "0".
  • 7. Cellspacing & Cellpadding • There are two attributes called cellspacing and cellpadding which will use to adjust the white space in table cells. • The cellspacing attribute defines space between table cells. • cellpadding represents the distance between cell borders and the content within a cell. – <table cellpadding = "5" cellspacing = "5">
  • 8. Colspan & Rowspan • We will use colspan attribute if we want to merge two or more columns into a single column. • Similar way we will use rowspan if we want to merge two or more rows. <table border = "1"> <tr> <th>Period 1</th> <th>Period 2</th> <th>Period 3</th> </tr> <tr> <td rowspan = "2"> Python </td> <td>HTML</td> <td>Computer</td> </tr> <tr> <td>Computer</td> <td>HTML</td> </tr> <tr> <td colspan = “2”>Python Lab</td> <td>Library</td> </tr> </table>
  • 9. Tables Background • bgcolor attribute − We can set background color for whole table or just for one cell. • background attribute − We can set background image for whole table or just for one cell. • We can also set border color also using bordercolor attribute. • Note − The bgcolor, background, and bordercolor attributes deprecated in HTML5. <table border = "1“ bordercolor = “red" bgcolor = "yellow"> <tr> <th>Period 1</th> <th>Period 2</th> <th>Period 3</th> </tr> <tr> <td rowspan = "2"> Python </td> <td>HTML</td> <td>Computer</td> </tr> <tr> <td>Computer</td> <td>HTML</td> </tr> <tr> <td colspan = “2">Python Lab</td> <td>Library</td> </tr> </table>
  • 10. Table Height & Width • You can set a table width and height using width and height attributes. • You can specify table width or height in terms of pixels or in terms of percentage of available screen area. <table border = "1" width = “400” height = “200” > <tr> <th>Period 1</th> <th>Period 2</th> <th>Period 3</th> </tr> <tr> <td rowspan = "2"> Python </td> <td>HTML</td> <td>Computer</td> </tr> <tr> <td>Computer</td> <td>HTML</td> </tr> <tr> <td colspan = “2">Python Lab</td> <td>Library</td> </tr> </table>
  • 11. Summary • HTML Table • Table Defining Tags and their attributes • In the next class, we will start Unit II – HTML Forms in detail. •Thanks