• in
InterCourses
CoursesBlogs
0
← Introduction to HTML
○What Is HTML? See Tags in Action○Exercise: Build the Meridian Signal○Complete HTML5 Page Structure: See It in Action○Exercise: Build a Complete HTML5 Page✦Module Quiz
○Heading Hierarchy Demo: H1 and H2○Exercise: Extend the Signal Brief○Paragraphs and Inline Tags Demo○Exercise: Write Meridian's Survey Notes○List Types Demo: Steps, Items, and Terms○Exercise: Build a Crew member Loadout○Challenge: Transmit a Rescue Signal✦Module Quiz
○Hyperlinks○Images○Applying Styles to HTML✦Module Quiz
○Div and Span●HTML Tables○Classes and IDs○Review: Structured Profile✦Module Quiz
○Project 1 - Visiting Card Structure○Project 1 - Visiting Card Actions✦Module Quiz
○The Head Element and Page Title○Meta Tags○HTML Entities✦Module Quiz
○Form Basics Demo: Join the Meridian Relay○Exercise: Build a Night-Shift Check-In○Input Types Demo: Build a Mission Profile○Exercise: Record Beacon Maintenance○Choice Controls Demo: Select Training Modes○Exercise: Plan a Supply Pickup○Response Controls Demo: Send a Mission Reply○Exercise: Build a Rescue Dispatch Report○Challenge: Send an Emergency Beacon✦Module Quiz
○Project 2 - Contact Us Form Structure○Project 2 - Contact Us Form Actions✦Module Quiz
○Embedding Video○Embedding Audio○Iframes✦Module Quiz
○Semantic HTML Tags○Details, Figure, and Figcaption✦Module Quiz
○Project 3 - Resume Semantic Structure○Project 3 - Resume Links and Actions✦Module Quiz

HTML Tables

Mission

The community repair café is posting a two-day schedule. Visitors need to scan times and stations in rows and columns, not read a paragraph. Build the schedule so its labels and data stay connected.

Note

Use tables for related data — schedules, price lists, comparison charts — not for page layout. CSS Flexbox or Grid handles layout.

What you'll build

A structured schedule table with a header row, at least two data rows, and one cell that spans multiple columns.

The table frame

A table is made of rows. Put each row in <tr>, then use <td> for ordinary data cells and <th> for labels.

html
<table>
    <tr>
        <th scope="col">Station</th>
        <th scope="col">Time</th>
    </tr>
    <tr>
        <td>Bike repair</td>
        <td>10:00</td>
    </tr>
</table>

scope="col" tells assistive technology that each header describes a column. Use scope="row" when a header describes the row instead.

Give the schedule sections

<thead> holds the column labels, <tbody> holds the repeated schedule entries, and <tfoot> can hold a summary. Those groups make the table easier to read and style.

html
<table>
    <thead>
        <tr><th scope="col">Station</th><th scope="col">Slots</th><th scope="col">Host</th></tr>
    </thead>
    <tbody>
        <tr><td>Bike repair</td><td>2</td><td>Mika</td></tr>
        <tr><td>Book mending</td><td>3</td><td>Ren</td></tr>
    </tbody>
    <tfoot>
        <tr><td colspan="2">Open stations</td><td>2</td></tr>
    </tfoot>
</table>

colspan="2" lets the footer label cover two columns. rowspan="2" works the same way down across two rows.

Checkpoint

Run the page. You should see a header row above at least two schedule rows, plus one wider cell spanning columns. If the columns shift, count the cells in every row and check the colspan value.

Your Task

Build the repair café’s two-day station schedule:

  1. Add one <table> element.
  2. Add a <thead> row with three <th scope="col"> headers: time, day, and station.
  3. Add a <tbody> with at least 2 rows of schedule data, using <td> cells for their times, days, and stations.
  4. Add one <td colspan="2"> to a schedule row so its content spans two columns.

Payoff

The repair café now has a schedule whose column headers label the times, days, and stations.

Hint 1
1 / 4
HINT 1

A table needs at least three tags: <table>, <tr> (row), and <td> (cell).

HINT 2

Use <th> instead of <td> for header cells — they are bold and centred by default.

HINT 3

Use <thead>, <tbody>, and <tfoot> to give the table structure — they help assistive tech and CSS.

HINT 4

colspan="2" makes a cell span 2 columns. rowspan="2" makes it span 2 rows.

Loading editor…
READY
intercourses
html