Simple HTML Table Example

Eugene Jul 31, 2026

In the vast landscape of web development, HTML (HyperText Markup Language) serves as the backbone, enabling us to create and structure content on the World Wide Web. Among its numerous elements, the humble table is a powerful tool for organizing and displaying data in a clear, easy-to-understand format. Let's delve into a simple yet comprehensive example of an HTML table, exploring its structure, key attributes, and common uses.

๐Ÿ“Š HTML Tables | Create Tables in HTML (Lesson 8)
๐Ÿ“Š HTML Tables | Create Tables in HTML (Lesson 8)

Tables in HTML are defined using the `

` tag, with rows created using the `` tag and data cells using the `
` tag. Each table can have a header, defined using the `` tag, which helps to distinguish the purpose of each column. Let's start by creating a simple table with a header and three rows, each containing three data cells.

HTML Table
HTML Table

Basic Table Structure

The foundation of any HTML table is its basic structure. Here's a simple example:

๐Ÿงพ How to Create Tables in HTML
๐Ÿงพ How to Create Tables in HTML

Header 1 Header 2 Header 3
Data 1 Data 2 Data 3
Data 4 Data 5 Data 6

Table Headers

HTML Basic Tables
HTML Basic Tables

Table headers, defined using the `

` tag, are essential for accessibility and SEO. They help screen readers understand the purpose of each column and provide context for search engine crawlers. You can also use the `scope` attribute to explicitly define the scope of the header cell.

Header 1 Header 2 Header 3
Data 1 Data 2 Data 3

Table Borders and Styling

how to create html table | HTML TABLE TAG
how to create html table | HTML TABLE TAG

By default, HTML tables have no borders. To add borders, you can use the `border` attribute. For more advanced styling, consider using CSS. Here's an example with a border and some basic styling:

Header 1 Header 2 Header 3
Data 1 Data 2 Data 3

Table Layout and Alignment

Responsive HTML Table With Rounded Corners
Responsive HTML Table With Rounded Corners

Tables can be laid out using two methods: `table-layout: fixed` and `table-layout: auto`. The default is `auto`, which allows columns to adjust their widths based on content. `Fixed` sets a fixed width for the table and allows you to control column widths using the `width` attribute.

You can also control the alignment of text within table cells using the `align` attribute. `left`, `center`, and `right` are the accepted values.

29 Free CSS3 & HTML Table Templates 2026 - Colorlib
29 Free CSS3 & HTML Table Templates 2026 - Colorlib
Display CSV As HTML Table In PHP
Display CSV As HTML Table In PHP
the table borders for different types of text
the table borders for different types of text
Pricing Table | HTML & CSS
Pricing Table | HTML & CSS
Table concept
Table concept
20 Creative Table UI Design Examples You Should Know in 2021
20 Creative Table UI Design Examples You Should Know in 2021
Welcome to SiteRaw
Welcome to SiteRaw
CSS Table Layout
CSS Table Layout
an image of a table with many lines
an image of a table with many lines
a table with several different types of text and numbers on the top, bottom left corner
a table with several different types of text and numbers on the top, bottom left corner
๐Ÿ“Š Combine Table Cells in HTML
๐Ÿ“Š Combine Table Cells in HTML
Simple Searchable Table In HTML Javascript
Simple Searchable Table In HTML Javascript
A Detailed Guide to HTML Tables | Simplilearn
A Detailed Guide to HTML Tables | Simplilearn
Table Keynote Templates - 20 best design infographic templates
Table Keynote Templates - 20 best design infographic templates
an info sheet describing the different types of web pages and how they are used to create them
an info sheet describing the different types of web pages and how they are used to create them
25,200+ Excel Table Stock Illustrations, Royalty-Free Vector Graphics & Clip Art - iStock
25,200+ Excel Table Stock Illustrations, Royalty-Free Vector Graphics & Clip Art - iStock
The table-layout property in CSS
The table-layout property in CSS
Responsive Table V1 - Free HTML/CSS Table Template 2026 - Colorlib
Responsive Table V1 - Free HTML/CSS Table Template 2026 - Colorlib
HOW TO MERGE TABLE CELLS IN HTML
HOW TO MERGE TABLE CELLS IN HTML
the table slide is shown in blue and green colors, with different sections labeled on each side
the table slide is shown in blue and green colors, with different sections labeled on each side

Header 1 Header 2 Header 3
Data 1 Data 2 Data 3

Table Captions and Summaries

Table captions provide a brief description of the table, while the `summary` attribute offers a more detailed explanation. Both are useful for accessibility and SEO.

Sales Data
Product Month 1 Month 2 Month 3
Product A 100 150 200

In conclusion, HTML tables are a versatile tool for organizing and presenting data. From simple structures to complex layouts, they offer a wealth of possibilities. Whether you're displaying product information, creating a sitemap, or building a data grid, tables are an essential part of your HTML toolkit. So, go ahead, explore, and create!

© 2026 Eugene Ideas. All rights reserved.