Creating tables in HTML is a fundamental aspect of web development, enabling you to present data in a clear and organized manner. HTML tables are particularly useful for displaying tabular data, with rows and columns that can be easily structured and styled. Let's dive into a simple HTML table code example and explore its components in depth.

At its core, an HTML table is defined by the `
| ` (table data) or ` | ` (table header) tags. The ``, ` | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Header 1 | Header 2 |
|---|---|
| Data 1 | Data 2 |
In this example, we have a table with one row of headers and one row of data. Now, let's look at how to add more rows and columns.

Increasing Rows and Columns
To create more rows, simply add more `
| Header 1 | Header 2 | Header 3 |
|---|---|---|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
```
In this table, we added new headers and data, expanding both the rows and columns.

Spanning Columns with <colspan>
To create a cell that spans multiple columns, use the `
Combined Header
Header 3
Data 1
Data 2
Data 3
```
The newly combined header now spans two columns.

Styling and Enhancing HTML Tables
To improve the appearance and functionality of your tables, consider adding styles and enhancing them with some features provided by HTML.




















Using the <style> Tag for Basic Styling
Apply some basic styling directly within your HTML using the `

