Search⌘ K

Defining a Simple Table in HTML

Explore how to define simple tables in HTML using the <table>, <tr>, and <td> tags. Understand the separation of content and style in HTML5 and how to build basic tabular layouts for presenting structured data such as contacts or lists.

The old school sample you saw in Listing: Making use of tables used a few attributes (dimensions) to define a very basic style for the table defined in the markup. In contrast to that, HTML5 explicitly separates the content of a table from its style.

The tags defining the structure of your table focus on the content and layout, and you must use separate styling rules to establish the visual properties of the tabular ...