Skip to content
Tutorials Center
My learning

Topics

Lesson 119 of 122 ยท Projects

Project: Event Page

Build a complete event page in HTML with machine-readable dates, a schedule table, speaker cards, a static venue map and an accessible registration form.

Conferences, meetups, workshops, concerts and weddings all need the same kind of page: what is happening, when, where, who is speaking and how to sign up. An event page is a great project because each of those questions maps to a different HTML tool: <time> for dates, a real <table> for the schedule, a list of cards for speakers, a map and an <address> for the venue, and a form for registration.

In this project you will build the page for Lakeside Web Day, a fictional one-day conference. You'll make the dates readable by machines as well as people, link speakers to their sessions, show the venue without loading a third-party map, and finish with a registration form that prints what it would send. Every step has its own editor, and the last step combines everything into one page.

About the preview width. The previews here are narrow, so they show the phone layout. Copy the final example into an .html file and resize your browser window to see the wider layout.

Step 1: The event header and key facts

Visitors decide in a few seconds whether an event is for them, so the top of the page answers the essential questions at once: the name in the <h1>, a one-line pitch, and the date, time and place.

The date and times use the <time> element. People read "Saturday, November 14, 2026"; browsers, search engines and calendar tools read the datetime attribute, 2026-11-14. Because the value is machine-readable, a short script can use it, too: here it reads element.dateTime and works out how many days are left.

Step 1: event header with a countdown

The facts are a description list (<dl>), because they are nameโ€“value pairs: "Date: โ€ฆ", "Time: โ€ฆ", "Place: โ€ฆ". Wrapping each pair in a <div> is allowed and makes them easy to lay out; see Description Lists.

Notice the datetime formats. A date alone is YYYY-MM-DD. A date with a time is YYYY-MM-DDTHH:MM, which is a local time. For online events that people join from many countries, add the time-zone offset so the moment is unambiguous: 2026-11-14T09:00+01:00. The countdown runs on today's date, so its message changes as the event gets closer.

Step 2: The schedule table

A conference schedule is real tabular data: every row is a time slot, and every column answers the same question for that slot (what, who, where). That makes <table> the right element, as you learned in HTML Tables.

A few details make it excellent rather than just correct:

  • A <caption> names the table, so screen-reader users know what they've entered.
  • The time of each slot is a row header (<th scope="row">), so a screen reader announces "10:00, Room, Harbor" while moving through a row.
  • Breaks span the remaining columns with colspan="3" (see Colspan and Rowspan).
  • Each session row has an id, so other parts of the page, such as the speaker cards, can link straight to it.
Step 2: schedule table

Click the link under the table. The URL fragment #talk-svg matches the row's id, and the CSS tr:target rule highlights it. Any page can link to a single session this way, which is handy when you share it in a chat.

Should the times be headers or data? Here each time is the name of its row, so <th scope="row"> fits. If your schedule had several parallel tracks, you'd make the rooms the column headers instead, and each cell would hold the talk in that room at that time.

Step 3: Speaker cards

Speakers are a collection of similar items, so they belong in a list. Each speaker gets a heading with their name, a line about who they are, a short bio and a link to their session in the schedule. The avatar is a small inline SVG with initials. It repeats the name that the heading already says, so it is hidden from assistive technology with aria-hidden="true".

Step 3: speaker cards linked to sessions

The links point at #talk-keynote, #talk-forms and #talk-svg, the row IDs from Step 2. They don't go anywhere in this preview because the table isn't here; in the final page they jump to the right row. Link text such as "Talk at 10:00" makes sense on its own, unlike "click here" (see Links in Depth).

Using <li> for each card means a screen reader announces "list, 3 items" before the first speaker, so users know how many there are. The <h3> headings let them jump from speaker to speaker.

Step 4: The venue, with a static map

Most event pages embed an interactive map from a big map provider in an <iframe>. That works, but it has real costs:

  • Privacy: the provider can set cookies and learn who looked at your page, often before the visitor has agreed to anything.
  • Performance: a map embed can download over a megabyte of scripts and tiles, even for visitors who never scroll to it.
  • Reliability: if the provider changes its terms or blocks framing, the box goes blank.

A good alternative is a static map image that you control, plus the full address as text and a link that opens the visitor's own map app. Our map is an original SVG, so it's tiny and sharp on every screen. Inside a <figure> it gets a visible caption, and its alt text describes what matters: where the venue is in relation to the station.

The address goes in an <address> element. That element is for contact information, and a venue's postal address is exactly the contact information an attendee needs.

Step 4: venue with a static SVG map

The directions are an ordered list, because the order of the steps matters. The note about step-free access is the kind of information disabled attendees usually have to email to ask for; putting it on the page is both kinder and less work for the organizers.

If you do want an interactive map, load it only when the visitor asks for it. Show the static map with a button labeled "Show interactive map", and create the <iframe> in the button's click handler. When you do embed one, give it a title, loading="lazy" and a strict referrerpolicy, as described in Iframes:

HTML
<iframe src="https://maps.example.com/embed?place=dockside-hall"
        title="Interactive map of Dockside Hall"
        width="600" height="400"
        loading="lazy"
        referrerpolicy="no-referrer"></iframe>

Step 5: The registration form

The form collects only what the organizers really need: name, email, ticket type, one workshop choice, dietary needs and agreement to the code of conduct. It reuses the patterns from Project: Accessible Contact Form:

  • Every control has a visible <label>.
  • Related radio buttons and checkboxes sit in a <fieldset> with a <legend> that asks the question.
  • type="email", autocomplete, required and aria-describedby hints do most of the work, with no extra code.
  • The submit handler calls preventDefault() and prints the data on the page instead of sending it anywhere.

Checkbox groups are the one tricky part: several boxes share the name diet, so FormData.get('diet') would only return the first one. Use getAll('diet') to collect every ticked value.

Step 5: registration form

Fill it in and press Register. If you leave out a required field, the browser stops you with its own message and moves focus to the problem. When everything is valid, the summary appears as a description list. It is a role="status" region, so screen readers announce it without moving focus. The handler sets each value with textContent, never innerHTML, so someone typing <script> into the notes can't inject code into the page.

The console line shows a common gotcha: Object.fromEntries(data) keeps only one value per name, so it loses all but the last dietary choice. That's why the summary uses getAll().

Step 6: The complete event page

The final page combines everything and adds the parts that make it a real page: a skip link, a header with in-page navigation, landmarks, a footer and a little responsive CSS. From 48rem wide, the venue section puts the map and the address side by side.

It also includes structured data: a JSON-LD block that describes the event with the schema.org Event type. Search engines can use it to show the date and place directly in results. You met this in Structured Data.

Step 6: complete event page

Tour the finished page with the keyboard. Tab shows the skip link first. The navigation jumps to each section. The schedule region scrolls sideways with the arrow keys on narrow screens. Each speaker's session link jumps to the highlighted row. The form checks every required field before the handler runs.

One thing to fix before reusing this code. The success message is added with insertAdjacentHTML, which is fine here because the text is fixed. Never build HTML strings that include what the user typed; use textContent as the loop above does.

Accessibility checklist for event pages

Events attract people who haven't visited your site before and who often arrive on a phone, sometimes on the way to the venue. Check these before you publish:

  • Dates are unambiguous. Write the weekday and the month as a word ("Saturday, November 14"), because 11/14 and 14/11 mean different things in different countries. Put the machine format in datetime.
  • Time zones are stated for online or international events, both in the text and in the datetime offset.
  • The schedule is a real table with a caption and row or column headers, not a grid of <div>s.
  • The map has a text alternative. The address and walking directions are text, so they can be copied, translated and read aloud.
  • Access information is on the page: step-free entry, restrooms, quiet rooms, captions for online talks.
  • The form asks only for what you need, with labels, grouped choices and clear errors (see Form Validation).
  • Headings outline the page. One <h1>, then an <h2> for each section. Read just the headings: they should tell the whole story.
  • Metadata is ready for sharing, because event links are shared constantly; add social sharing previews.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Why does the event date use <time datetime="2026-11-14">Saturday, November 14, 2026</time>?

    The content is for people and can be written any way you like. The datetime attribute holds the standardized value that software can rely on, as the countdown script shows.
  2. 2. In the schedule table, why is each time slot marked up as <th scope="row">?

    Row headers give each data cell context. When a user moves to the Room cell, a screen reader can announce both the time and the column header.
  3. 3. Three checkboxes share name="diet" and two are ticked. What does new FormData(form).get('diet') return?

    get() returns the first value for a name. Use getAll('diet') to receive every ticked value as an array.
  4. 4. What is the main advantage of a static SVG map over an embedded third-party map iframe?

    An embedded map can track visitors and download a lot of code. A small static image you control, plus a text address and a link to a map app, avoids both problems.
  5. 5. Why does the registration handler use textContent to show what the visitor typed?

    textContent never parses HTML. Inserting user input with innerHTML or insertAdjacentHTML could let someone inject markup or scripts.

Summary

  • An event page answers what, when, where, who and how to sign up, each with the right element.
  • Use <time datetime="โ€ฆ"> for every date and time; add a time-zone offset for international events. Scripts can read the value with element.dateTime.
  • The schedule is a real <table> with a caption, column headers and row headers; colspan covers breaks, and row ids let other parts of the page link to sessions.
  • Speakers are a list of cards with headings; decorative avatars get aria-hidden="true".
  • Prefer a static map you control, plus an <address> and written directions; load an interactive map only on request.
  • The registration form uses labels, fieldsets, built-in validation and FormData (getAll() for checkbox groups), and prints the data with textContent.
  • JSON-LD with the schema.org Event type helps search engines show the date and place.

You've built five complete pages in this chapter. Next: HTML Cheat Sheet, a one-page summary of everything in the course.