OnlineCBT Logo OnlineCBT
HTML Tutorial
HTML · LESSON 25

Rows, Columns and Cells

By Ratan Updated: 16 Oct 2026

Create complex multi-row and multi-column table layouts accurately.

Level: Beginner to Advanced
Duration: ~60 Mins Deep-Dive

1. Structuring Data with Rows, Columns, and Cells

A table is constructed row by row from top to bottom. Every row must maintain a consistent count of cells ( or ) unless cells span across multiple columns.

2. Complete Tabular Schedule Example

Date Subject Duration Shift
25 Oct 2026 Physics Part I 90 Minutes Morning (09:00 AM)
26 Oct 2026 Chemistry Part I 90 Minutes Afternoon (02:00 PM)

3. Styling Tables with CSS

Modern tables are styled with CSS rather than outdated HTML attributes like cellpadding and cellspacing:

table {
  width: 100%;
  border-collapse: collapse; /* Collapses double borders into a clean single line */
}
th, td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  text-align: left;
}
th {
  background-color: #f8fafc;
  font-weight: 600;
}

📝 Live Lesson Practice

HTML/CSS JavaScript Python C++ C PHP
⌨️ Practice Inputs (लाइव इनपुट भरें) (खाली होने पर RED, भरने पर GREEN underline)
💻 Code Editor (Monaco VS Code Engine)
👀 Live Preview
पता संपर्क करें

+91 7877547686

ई-मेल

onlinecbtportal@gmail.com

हेल्पलाइन नंबर

+91 7877547686


डाउनलोड करने के लिए क्लिक करें
Get it on Google Play

ऐप डाउनलोड करने
के लिए Google Play पर
उपलब्ध है

WhatsApp Chat