More Related Content
PPTX
PDF
Chapterrrrrrrrrrr_10_Building Tables.pdf PPTX
Table structure introduction PPSX
Computer language - Html tables PDF
PPTX
Table in MS Frontpage 2003 PPTX
HTML Styles - Cascading Style Sheets Cascading Style Sheets PPT
Similar to Table Creation in HTML using <table> tag
PPTX
PPTX
HTML_Tables Attribut and omformationes.pptx PPTX
Method of creating table using HTML.pptx PPTX
PPTX
Web design - Working with tables in HTML PPT
chapter 3 Basics of web design chapter 3 forcusing html tables PPTX
HTML-TABLES (2).pptxThe learners demonstrate an understanding of the fundamen... PPTX
Std 10 Computer Chapter 4 List and Table Handling in HTML (Part 2 Table in HTML) PPTX
HTML-Tables-A-Comprehensive-Guide (1).pptx PPTX
A PPT on Creation of Tables in HTML, WEB Designing PPTX
HTML Table Layout: Structure, Tags, and Features ODP
PDF
HTML (Table and Multimedia): Understanding Web Development Essentials DOCX
table html web programing PPT
PDF
PPT
PPT
PPTX
PPTX
Recently uploaded
PPTX
TR334_Foundation_Engineering_I_Slope stability _i.pptx PDF
Arithmetic for computers and its types.. PPT
Steam generation , types of steam, boilers and their classifications, mountin... PPTX
PVD MNA 501 Recipe Review with understanding PDF
convex_hull generation using the Quickhull PPT
lecture ppt on chlor_alkali_industries process PPTX
PQ CHP-2 is about passive pq problems and PPTX
AI INTRODUCTION New Microsoft Office PowerPoint Presentation.pptx PPT
Steam Power plant Generation anatomy and organs PPTX
Slide sur les concepts_Module_5_STP.pptx PPT
Unit 1 - SHAPER, MILLING AND GEAR CUTTING MACHINES .ppt PPTX
narrow-band-dfr-presentation-megger.pptx PPTX
Lecture 2_Introduction to engineering design.pptx PDF
lecture on Microprocessor: 8288 bus controller PDF
0acebd80-08f7-4be1-9135-15abe45dbc94.pdf PPTX
MET 464 /MOD 2/MIRCO AND NANO MANUFACTURING/SESSION 1.pptx PPT
DECISION MAKING SYSTEMS Modelling and Support PPT
Escape-17-plenary-gani-grossmann-final.ppt PPTX
chapterOverview - embedded systems .pptx PPTX
Lecture 1 - Introduction to Well Test Interpretation (2).pptx Table Creation in HTML using <table> tag
- 1.
- 2.
- 3.
Basic Table Structure
•<table>: Defines the table
• <tr>: Defines a table row
• <th>: Defines a table header
• <td>: Defines a table data cell
- 4.
Example of aSimple Table
<table border='1'>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
</table>
- 5.
Table Attributes
• border:Defines table border
• cellspacing: Space between cells
• cellpadding: Space inside cells
• width: Defines table width
• align: Aligns the table
• bgcolor: Background color
- 6.
Styling Tables withCSS
• border-style: Defines border type
• border-collapse: Merges adjacent borders
• padding: Space inside cells
• text-align: Aligns content
Example:
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid black;
padding: 10px;
text-align: left;
}
- 7.
Merging Rows andColumns
• rowspan: Merges multiple rows
• colspan: Merges multiple columns
Example:
<td colspan='2'>Merged Cell</td>
<td rowspan='2'>Merged Row</td>
- 8.
Adding Background Color
•Using bgcolor attribute (deprecated)
• Using CSS background-color
Example:
td {
background-color: lightblue;
}
- 9.
- 10.
Example using Background-color
<html>
<head>
<title>TableBackground Color Example</title>
<style>
table {
width: 50%;
border-collapse: collapse;
background-color: lightgray; /* Table background color */
}
th {
background-color: darkblue; /* Header background */
color: white; /* Text color for header */
}
td {
border: 2px solid black;
padding: 10px;
text-align: center;
}
</style>
- 11.
- 12.
Conclusion
• HTML tablesare useful for organizing data
• CSS improves table appearance
• Use proper attributes for better design
- 13.