# Tables

## Introduction

Tables used to be pretty much the only game in town -- when you had data of any sort, you pretty much had to use one to display it. You also had to use tables to wrangle the layout of your page into some semblance of order. Thankfully, those days are behind us (thanks to CSS) and now tables can often be more of a hindrance than a benefit for any but the core use cases. That said, they are still the go-to way to get structured data onto the page.

## Learning outcomes

* When should you use tables?
* What is the structure of a table?
* What are the special tags that dictate certain parts of a table, e.g. headers or captions?
* How can you combine cells in a table?
* Why do you need to be careful about your padding and borders in tables?
* How do you align text within cells in a table?

## Assignment

1. Read [Shay Howe's Chapter on Tables](http://learn.shayhowe.com/html-css/organizing-data-tables)
2. Glance over the [HTML Docs on Tables](http://www.w3schools.com/html/html_tables.asp), which you'll no doubt see again.

## Additional resources

This section contains helpful links to other content. It isn't required, so consider it supplemental for if you need to dive deeper into something.

* [An older tutorial on Tables from HTML Goodies](http://www.htmlgoodies.com/tutorials/tables/article.php/3479851)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://howtocode.trek.io/topics/deep-dives/html-css/html-basics/tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
