CHAPTER 30 · HTML
Guided project: build and check a college practice timetable
Turn the table lessons into a small page a classmate can use. Begin with the data, build a working draft, add preparation details and readable styling, then test the result against a clear checklist.
Download example files (ZIP)The problem you are solving
Agree on the requirements first
Show a meaningful browser title and page heading. Give the timetable a clear caption. List session, room, duration in minutes and preparation in separate columns. Give every column a real header and every session a row header. Group labels, records and the duration summary appropriately. Include three fictional sessions, with durations of 30, 45 and 30 minutes. Make all columns reachable on a narrow screen without tiny text. Explain that the total is written manually and must be updated after edits.
Plan the data before writing tags
- 1Write requirements and consistent units
- 2Create a small valid draft
- 3Add records and recheck summaries
- 4Test data, narrow view and keyboard use
The final timetable has three sessions and 105 minutes. Static totals must be edited when records change.
Step 1: build a small working draft
Complete program: timetable-start.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Practice Timetable Draft</title>
</head>
<body>
<h1>Draft the college practice plan</h1>
<p>This draft contains two fictional sessions. Preparation details come next.</p>
<table>
<caption>First draft of the practice timetable</caption>
<thead>
<tr><th scope="col">Session</th><th scope="col">Room</th><th scope="col">Minutes</th></tr>
</thead>
<tbody>
<tr><th scope="row">Headings practice</th><td>Room 6</td><td>30</td></tr>
<tr><th scope="row">Link practice</th><td>Room 8</td><td>45</td></tr>
</tbody>
<tfoot>
<tr><th scope="row" colspan="2">Total session minutes</th><td>75</td></tr>
</tfoot>
</table>
</body>
</html>This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.
Step 2: make a controlled change
Step 3: explain the small amount of styling
Complete program: college-timetable.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>College Practice Timetable</title>
<style>
body { font-family: sans-serif; line-height: 1.5; color: #24382b; }
.table-window { overflow-x: auto; max-width: 100%; }
.table-window:focus-visible { outline: 3px solid #31573d; outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
caption { caption-side: top; text-align: left; font-weight: bold; padding: 8px; }
th, td { border: 1px solid #687466; padding: 10px; text-align: left; }
thead, tfoot { background-color: #e8efdf; }
tbody tr:nth-child(even) { background-color: #f6f5ee; }
</style>
</head>
<body>
<h1>Prepare for the college practice sessions</h1>
<p>These fictional sessions help students revise one idea at a time.</p>
<p id="schedule-help">Durations are in minutes. On a narrow screen, scroll the table sideways; keyboard users can focus its container and use arrow keys.</p>
<div class="table-window" tabindex="0" role="region" aria-labelledby="schedule-caption" aria-describedby="schedule-help">
<table>
<caption id="schedule-caption">College practice timetable and preparation</caption>
<thead>
<tr><th scope="col">Session</th><th scope="col">Room</th><th scope="col">Minutes</th><th scope="col">Preparation</th></tr>
</thead>
<tbody>
<tr><th scope="row">Headings practice</th><td>Room 6</td><td>30</td><td>One saved notice</td></tr>
<tr><th scope="row">Link practice</th><td>Room 8</td><td>45</td><td>Two linked HTML files</td></tr>
<tr><th scope="row">Table review</th><td>Room 6</td><td>30</td><td>A checked timetable</td></tr>
</tbody>
<tfoot>
<tr><th scope="row" colspan="2">Total session minutes</th><td>105</td><td>Three sessions</td></tr>
</tfoot>
</table>
</div>
<h2>Before you share the plan</h2>
<p>The total is written manually. Recheck it whenever a session duration changes.</p>
<p><a href="link-home.html">Revisit the two-page link exercise</a></p>
</body>
</html>This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.
Step 4: test with expected answers
Step 5: inspect the source and keep it maintainable
Problem and solution: the finished page no longer matches the plan
Common mistakes and useful tips
Decorating the table before confirming its records and units. Adding a column to only some rows. Repeating a cell already covered by colspan in the footer. Treating manually written totals as formulas. Removing useful headers to make the page visually smaller. Testing only at one wide browser width. Calling the project complete before checking its requirements.
Practice questions
Which final requirements does the starter page not yet meet? Why does the final table's footer use colspan="2"? What is the new total if Table review changes from 30 to 40 minutes? Why does the preparation column need a value in every body row? What should a narrow-screen test prove beyond merely showing a scrollbar? Add a fourth session called Revision clinic in Room 8 for 20 minutes, with preparation One question to discuss. Update the final page and check every requirement again.
Check your practice answers
It has only two sessions, lacks the Preparation column and has no narrow-screen scrolling design. Its draft total is correctly 75 for the records it currently contains. The total label occupies Session and Room, so its numeric value sits in the third column under Minutes. 115 minutes. Also check any text that describes durations or counts. Every row must preserve the column relationship. If preparation is unknown, use clear wording rather than silently shifting later values. The final column must actually be reachable and readable, including through keyboard use when needed. The rest of the article should remain usable. From the original completed version, the new total is 125 and there are four sessions. Add a row with the same four positions and change the footer count note. Test the data, scrolling and link again.
Interview questions
How did you decide that this content needed a table?
What makes this a guided project rather than a copied layout?
What must change when a duration is edited in this static page?
How would you explain the page's current limits?
Quick revision
Agree on requirements and units before writing the table. Build the structure, check the data, then improve readability. Maintain static summaries whenever records change. A finished project meets its stated requirements and remains usable at narrow widths.