W3Schools HTML td Mastery Complete Guide

Logan Jul 13, 2026

Welcome to the comprehensive guide on HTML table data, focusing on the `` element, as taught on W3Schools. Understanding this will empower you to create structured, presentable tables within your web content.

a computer screen with the text html and an image of a web page on it
a computer screen with the text html and an image of a web page on it

HTML tables are crucial for displaying data in rows and columns. The `` tag defines a cell within an HTML table. Let's delve into the details of using `` effectively.

HTML Cheat Sheet 📄✨ Quick Guide for Beginners
HTML Cheat Sheet 📄✨ Quick Guide for Beginners

Understanding the `` Element

The TD (Table Data) tag is used to specify the data in an HTML table. It must be within a `` (table row) tag, which in turn must be inside a `

`.

a web page with the words html and css in green, white and black
a web page with the words html and css in green, white and black

Each `

```

While the `align` attribute is now deprecated in HTML5, you can achieve the same results using CSS.

Conclusion: Embracing `

` element creates a new cell, which can contain text, images, links, or any other HTML elements. Let's see it in action with some examples.

Basic `

` Syntax
18 Exciting HTML and CSS Project Ideas with source code to Level Up Your Web Development Skills
18 Exciting HTML and CSS Project Ideas with source code to Level Up Your Web Development Skills

The basic syntax for using `

` is simple. Here's a basic example:

```html

Cell 1 Cell 2

```

This code will create a table with two cells: "Cell 1" and "Cell 2".

the csss3 class sheet is shown in orange and blue, with black letters on it
the csss3 class sheet is shown in orange and blue, with black letters on it

Spanning and Merging Cells

Using the `colspan` and `rowspan` attributes, you can merge cells both horizontally and vertically. Here's how:

```html

Normal Cell Spanning 2 columns
Spanning 2 rows Normal cell

HTML vs CSS vs JavaScript: What Each One Actually Does (Beginner's Visual Guide)
HTML vs CSS vs JavaScript: What Each One Actually Does (Beginner's Visual Guide)

```

The first cell in the second row spans two rows, while the second cell in the first row spans two columns.

Styling `

` Elements
#CSS Animations Tips and Tricks
#CSS Animations Tips and Tricks
an image of a web page with the words in different languages
an image of a web page with the words in different languages
Master HTML in 10 Minutes 💻 Beginner Cheatsheet
Master HTML in 10 Minutes 💻 Beginner Cheatsheet
HTML & CSS Project Ideas for Beginners
HTML & CSS Project Ideas for Beginners
a blackboard with text and diagrams on it
a blackboard with text and diagrams on it
Html notes
Html notes
HTML Input Types: A Comprehensive Guide for Web Development & Coding
HTML Input Types: A Comprehensive Guide for Web Development & Coding
a computer screen with the text file editor highlighted
a computer screen with the text file editor highlighted
For More Such Tricks And Tips Of HTML & CSS
For More Such Tricks And Tips Of HTML & CSS
HTML Cheatsheets
HTML Cheatsheets
an image of a blue screen with the words html structure in white letters on it
an image of a blue screen with the words html structure in white letters on it
Website Development Series Day 0 #website #webdev #development #series
Website Development Series Day 0 #website #webdev #development #series
✅ Create Lists in HTML
✅ Create Lists in HTML
This CSS Animation Will Instantly Upgrade Your Website 🚀 (Pure HTML & CSS)
This CSS Animation Will Instantly Upgrade Your Website 🚀 (Pure HTML & CSS)
What Is HTML? Beginner’s Guide
What Is HTML? Beginner’s Guide
an image of a web page with the words'body'and'reader '
an image of a web page with the words'body'and'reader '
Html css project for beginners
Html css project for beginners
TailwindCSS Cheatsheet 2025 – Build Faster, Responsive UIs
TailwindCSS Cheatsheet 2025 – Build Faster, Responsive UIs
the before and after css web page is shown with an image of two screens
the before and after css web page is shown with an image of two screens

You can style your table data using CSS. Here's an example of changing the background color and text alignment of a cell:

```html

Highlighted Cell Normal Cell

```

Aligning Table Data

You can use the `align` attribute for aligning text within a cell. Here are the possible values: `left`, `right`, and `center`.

```html

Left aligned Right aligned Center aligned
` in Your Web Design

The `

` element is a critical tool in your web design toolkit. It offers a wealth of possibilities for presenting data in an organized, engaging manner. So get creative, and happy coding!

© 2026 Logan Ideas. All rights reserved.