Show the next step after HTML video
Updated: November 26, 2026
When a demo leads to a worksheet or exercise, leave that link visible and highlight the next step when the video ends. In a native HTML player you control, use the ended event. A third-party iframe needs its own documented event interface to notify your page.
Decide what happens at the end
Suppose a short lesson leads to a practice sheet. Put an “Open the worksheet” link below the player from the start. When the clip ends, show a sentence pointing viewers to the link. Let them open it when ready and leave keyboard focus where it was.
Bind the event to the video element
Give the player the ID demo and add an empty paragraph with the ID next-note and aria-live="polite". Put the paragraph by the link. Run the example after both elements are on the page. It adds a message when the media element emits ended. Remove the loop attribute if you need playback to finish normally.
If the page contains several demos, use distinct IDs and connect each player to its own note. Finish the shortest video first and check that it does not update the message for a different one. Give each worksheet link a name that explains which exercise it opens.
const demo = document.getElementById("demo");
const note = document.getElementById("next-note");
demo.addEventListener("ended", () => {
note.textContent = "The practice sheet is below the video.";
});Test three situations
- 1Let the clip finish and verify that the message appears without opening a different page.
- 2Pause halfway through and check that pausing does not display the message.
- 3Disable JavaScript and confirm that the link is still available.
- 4For an iframe, check the provider’s documentation for a supported completion event first.
Frequently asked questions
No. They can also reach the end by seeking. The message guides the viewer. An assessment of learning requires a separate step.