AMDE 355 · Advanced Web Design · Week 11
Multimedia & Experimental Interfaces
Designing web experiences that use images, sound, motion, video, and interaction with intention.
This week
From a web page to an experience
So far, we have worked with structure, layout, typography, responsive design, reusable components, navigation, and simple interactions. This week brings those ideas together through multimedia and experimentation.
A multimedia interface is not simply a page with lots of media. It is a designed experience in which images, type, sound, video, movement, and interaction work together to communicate an idea. A strong experience might use one large image, a quiet transition, and a clear interaction. More effects do not automatically make a better design.
We will also continue learning JavaScript in small, understandable steps. The goal is not to become a programmer overnight. The goal is to understand how to make a design respond to a visitor, and to be able to explain what the code is doing.
Learning objectives
By the end of this lesson, you should be able to:
- Explain how images, audio, video, animation, and interaction can support a design concept.
- Choose media formats and behaviors that suit the content and the visitor’s context.
- Use HTML to place media and CSS to control its presentation.
- Use a small amount of JavaScript to respond to a user action.
- Explain the JavaScript pattern find → listen → respond in your own words.
- Make a multimedia interface that remains understandable on mobile devices and usable without a mouse.
- Test the experience for readability, accessibility, loading behavior, and unnecessary motion.
Part 1 · Design thinking
Multimedia should have a purpose
Before adding an effect, ask what it contributes. Does it reveal information? Establish mood? Help the visitor understand a process? Create a useful sense of feedback? If the answer is simply “it looks cool,” test whether the effect helps the project or distracts from it.
| Media or behavior | Useful for | Potential problem |
|---|---|---|
| Large image | Establishing mood, showing visual work, setting art direction | Slow loading, poor crop, low contrast with overlaid text |
| Video | Showing process, performance, movement, or a time-based work | Large file size, unexpected autoplay, missing captions |
| Audio | Sound work, atmosphere, narration, or an optional audio layer | Unexpected playback, inaccessible controls, sound unavailable |
| Animation | Showing change, guiding attention, communicating state | Motion fatigue, distraction, motion that cannot be paused |
| Interactive control | Revealing details, switching views, filtering projects | Unclear labels, no keyboard support, interaction that does nothing useful |
Design principle: Make the experience intentional, not merely busy. Every media element should have a reason to be present, and every control should make its result understandable.
Part 2 · HTML media
Start with HTML before adding JavaScript
HTML provides the actual media element. CSS determines its appearance and placement. JavaScript is only needed when the page must respond to a custom action or update something dynamically.
Example A: A responsive image
<figure class="feature-image">
<img
src="images/studio-process.jpg"
alt="A close view of a photographic work in progress"
loading="lazy"
/>
<figcaption>Studio process, 2026</figcaption>
</figure>
What each part does: figure groups the image and its caption. img loads the image file. src points to the file. alt provides a text alternative for people who cannot see the image or use a screen reader. loading="lazy" lets the browser delay loading an image until it is closer to the visible area.
Write alt text according to the image’s purpose. If the image communicates important content, describe that content briefly. If it is purely decorative and adds no information, an empty alt attribute (alt="") may be appropriate.
Example B: A video with controls
<video
controls
playsinline
poster="images/video-poster.jpg"
>
<source src="media/studio-film.mp4" type="video/mp4" />
Your browser does not support this video.
</video>
The controls attribute gives the visitor playback controls. playsinline helps the video play within the page on supported mobile browsers. poster supplies an image to display before playback. The source element identifies the video file and its format.
Do not force visitors to watch a video before they can use the page. Avoid autoplay with sound. If a video contains meaningful speech or sound, provide captions or an appropriate text alternative.
Example C: Optional audio
<audio controls>
<source src="media/field-recording.mp3" type="audio/mpeg" />
Your browser does not support this audio.
</audio>
The built-in audio player is often the simplest and most reliable solution. You do not need JavaScript just to play an audio file. Use JavaScript only if you have a clear design reason for a custom control or a changing interface.
Part 3 · CSS presentation
Make media fit the layout
Images and videos often arrive in different sizes. CSS helps them behave consistently within a designed composition.
.feature-image img {
display: block;
width: 100%;
aspect-ratio: 16 / 9;
object-fit: cover;
border-radius: 12px;
}
.feature-image figcaption {
margin-top: 0.75rem;
font-size: 0.9rem;
color: #64748b;
}
In plain English: Select the image inside the feature figure. Make it a block, fill the available width, reserve a 16:9 shape, and crop the image to fill that shape. Then style the caption separately.
width: 100%means “use the full width of the parent container.”aspect-ratio: 16 / 9creates a widescreen-shaped area.object-fit: coverfills the area without stretching the image, cropping some edges if needed.- If you need to show the entire image, try
object-fit: containinstead. This may leave empty space around it.
For a portrait, artwork, or experimental photograph, do not automatically force a widescreen crop. Choose an aspect ratio that supports the work. The code is a starting point, not a rule that every image must follow.
Part 4 · JavaScript, step by step
JavaScript gives the interface a response
JavaScript is a language that can read and change the page while someone is using it. For this lesson, we will work with a very small set of ideas. You can understand these ideas without learning every part of the language.
1. Find the element you want to work with.
2. Listen for an action, such as a click.
3. Respond by changing text, showing content, or changing a class.
What is an element?
An element is a piece of the page described by HTML: a button, paragraph, image, video, heading, or container. JavaScript can find an element and then interact with it.
What is a selector?
A selector is a way to identify an element. If the HTML says id="sound-button", JavaScript can find it with document.querySelector("#sound-button"). The hash symbol # means an ID. A dot, as in ".media-card", means a class.
Example 1: Click a button to change a caption
<p id="media-caption">
This work explores movement and memory.
</p>
<button id="caption-button">
Reveal another note
</button>
const captionButton = document.querySelector("#caption-button");
const caption = document.querySelector("#media-caption");
captionButton.addEventListener("click", function () {
caption.textContent = "The image was made using a slow shutter speed.";
});
Read each line:
const captionButton = ...finds the button and gives it the namecaptionButton.constcreates a named variable we can refer to later.document.querySelector("#caption-button")means “look through this web page and find the element with this ID.”- The second
constfinds the paragraph and names itcaption. captionButton.addEventListener("click", ...)tells the browser to wait for a click on the button.function () { ... }contains the instructions that should run after the click.caption.textContent = ...replaces the paragraph’s text with the new sentence.
Notice that the selector names match the IDs in the HTML exactly. If the HTML ID is caption-button but the JavaScript searches for #caption-btn, the browser will not find the button.
Example 2: Toggle a media note open and closed
Sometimes a visitor should be able to choose whether to see more information. A toggle is an interaction that switches between two states: open and closed.
<button
id="note-toggle"
aria-expanded="false"
aria-controls="media-note"
>
Show the artist's note
</button>
<div id="media-note" hidden>
<p>
This sequence combines still photographs with movement studies.
</p>
</div>
const noteButton = document.querySelector("#note-toggle");
const mediaNote = document.querySelector("#media-note");
noteButton.addEventListener("click", function () {
const shouldOpen = mediaNote.hidden;
mediaNote.hidden = !shouldOpen;
noteButton.setAttribute("aria-expanded", shouldOpen);
if (shouldOpen) {
noteButton.textContent = "Hide the artist's note";
} else {
noteButton.textContent = "Show the artist's note";
}
});
How the toggle works:
- The button and note panel are found by their IDs.
- When the button is clicked, the code checks whether the panel is hidden.
shouldOpenis a name for the answer to that question: should the panel open now?mediaNote.hidden = !shouldOpensets the panel’s hidden state to the opposite ofshouldOpen. If it should open,hiddenbecomes false. If it should close,hiddenbecomes true.setAttribute()updatesaria-expanded, which communicates the state to assistive technology.- The
ifstatement chooses the correct button label. If the note opened, the button now offers to hide it. Otherwise, it offers to show it.
What does if mean? It means “if this condition is true, do this.” The else part means “otherwise, do this other thing.” You will see this pattern in many interactions.
Example 3: Add a visual state with a CSS class
Sometimes the content does not need to appear or disappear. You may want a button to change a visual state, such as switching a media panel into a focused presentation. CSS defines the look; JavaScript switches the class on or off.
<section id="focus-panel" class="media-panel">
<h2>Movement Study</h2>
<p>Explore the relationship between blur and gesture.</p>
</section>
<button id="focus-button">
Toggle focus mode
</button>
.media-panel {
padding: 1.5rem;
background: #f3f4f6;
transition: background-color 180ms ease;
}
.media-panel.is-focused {
background: #ecfccb;
outline: 2px solid #4d7c0f;
}
const focusButton = document.querySelector("#focus-button");
const focusPanel = document.querySelector("#focus-panel");
focusButton.addEventListener("click", function () {
focusPanel.classList.toggle("is-focused");
});
What does classList.toggle() do? It checks for the named class. If the class is missing, it adds it. If the class is already there, it removes it. In this example, CSS notices the class and changes the panel’s appearance.
Think of it this way: JavaScript does not need to know what the color should be. JavaScript only adds or removes the class. CSS is responsible for the visual design. Keeping those jobs separate makes the code easier to change and maintain.
Part 5 · Motion with care
Animation should communicate, not compete
Motion can direct attention, suggest a change, or give an interface a sense of rhythm. But constant movement can distract visitors, make text harder to follow, and cause discomfort for people who are sensitive to motion.
.media-card {
transform: translateY(0);
transition: transform 180ms ease, box-shadow 180ms ease;
}
.media-card:hover {
transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
.media-card {
transition: none;
}
}
This example gives a card a small lift when a mouse pointer hovers over it. The reduced-motion media query removes the transition for visitors who have asked their device to reduce motion.
Do not rely on hover alone. Touchscreen users do not hover in the same way, and keyboard users need visible focus states. If an effect communicates important information, make that information available in another way too.
JavaScript note: You do not need JavaScript for every animation. CSS is often the simplest tool for visual transitions. Use JavaScript when the page needs to respond to an action or manage a state that CSS alone cannot conveniently handle.
Part 6 · Troubleshooting
When your JavaScript does not work
- Check the IDs. The HTML
idand the JavaScript selector must match exactly, including hyphens and spelling. - Check the selector symbol. Use
#namefor an ID and.namefor a class. - Check script placement. If the script runs before the HTML element exists, JavaScript may not find it. Put the script near the end of the body, or load an external script with
defer. - Check the browser console. Right-click the page, choose Inspect, and select Console. Red error messages can point to a spelling mistake or a missing element.
- Check for missing punctuation. Parentheses, quotation marks, curly braces, and semicolons must be in the right places. JavaScript examples are sensitive to syntax.
- Test one small step at a time. First confirm the button appears. Then confirm the selector matches. Then add the click listener. Finally add the response.
Studio assignment
Build a multimedia experiment
Create a single-page multimedia experience based on one visual idea, mood, process, or theme. You may use photography, illustration, video, audio, typography, or a combination of media. Keep the layout intentional and the interaction easy to understand.
Required components
- A clear title and a short introduction that establish the concept.
- At least two media elements, such as images, a video, or an audio player.
- Captions or supporting text where they help explain the work.
- One purposeful interaction built with JavaScript: for example, reveal a note, change a caption, or toggle a visual state.
- Responsive layout behavior for desktop and mobile.
- Controls with clear labels and a usable keyboard focus state.
- A short explanation of why the media and interaction support the concept.
Suggested workflow
- Write one sentence describing the idea of your experience.
- Select media that supports the idea; avoid adding assets just to meet a count.
- Sketch the layout before writing code.
- Build the HTML structure and confirm that the media loads.
- Style the layout with CSS and check it at a narrow viewport.
- Add one small JavaScript interaction using find → listen → respond.
- Test the interaction, keyboard access, captions, image alternatives, and reduced-motion behavior.
- Ask a classmate to use the page without verbal instructions. Watch where they hesitate.
- Make at least one revision based on the test.
Reflection + submission checklist
Before you submit
- The design communicates one clear idea.
- Media choices feel intentional and do not overwhelm the content.
- Images have appropriate alt text; meaningful video has captions or an equivalent alternative.
- Video and audio do not unexpectedly start with sound.
- The page works at desktop and mobile widths.
- The JavaScript interaction works more than once and can be understood from its label.
- The button or control can be reached and used with a keyboard.
- Motion is restrained and reduced-motion preferences are considered.
- The browser console has been checked for errors.
- You can explain what each line of your JavaScript example does in plain English.
Reflection prompt: What did multimedia allow you to communicate that a static layout could not? What did you remove or simplify during testing, and why?
Instructor-only material · Remove before publishing to students
Instructor Layout Code — Step by Step
Teaching priority: Keep the JavaScript instruction slow, explicit, and concrete. Students should understand the behavior they are building before they copy code. Do not introduce multiple new concepts at once. Begin with the caption-change example, narrate the find → listen → respond pattern, and then move to the toggle only when the class can explain the first example.
Instructor demonstration 1: Establish the HTML target
Ask students to point to the element that should change. In this example it is the paragraph. Then ask how the script will identify it. The answer is the paragraph’s ID, media-caption. Explain that the hash in #media-caption tells querySelector() to find an ID.
<p id="media-caption">
This work explores movement and memory.
</p>
<button id="caption-button">
Reveal another note
</button>
Instructor demonstration 2: Explain each JavaScript line out loud
// FIND: store a reference to the button.
const captionButton = document.querySelector("#caption-button");
// FIND: store a reference to the paragraph.
const caption = document.querySelector("#media-caption");
// LISTEN: wait until the button is clicked.
captionButton.addEventListener("click", function () {
// RESPOND: replace the paragraph's text.
caption.textContent = "The image was made using a slow shutter speed.";
});
Explain that const is not a special action; it creates a name for something the code will use. document refers to the current page. querySelector() searches for an element. addEventListener() waits for an event. The word click names the event. The function holds the instructions that should run when the click happens. textContent changes the text inside the paragraph.
Use a three-column board or slide: FIND (the two selectors), LISTEN (the click event), and RESPOND (the text change). Ask students to identify which line belongs in each column. This checks comprehension without asking them to memorize terms in isolation.
Instructor demonstration 3: Add a simple condition
Before showing the toggle code, explain that the panel has two states: hidden and visible. A condition lets the code choose which action to take. The browser’s built-in hidden property can be true or false. True means the element is hidden; false means it is shown.
const noteButton = document.querySelector("#note-toggle");
const mediaNote = document.querySelector("#media-note");
noteButton.addEventListener("click", function () {
// If the note is hidden now, shouldOpen will be true.
const shouldOpen = mediaNote.hidden;
// Set hidden to the opposite of shouldOpen.
mediaNote.hidden = !shouldOpen;
// Tell assistive technology the current open/closed state.
noteButton.setAttribute("aria-expanded", shouldOpen);
// Choose a button label based on the new state.
if (shouldOpen) {
noteButton.textContent = "Hide the artist's note";
} else {
noteButton.textContent = "Show the artist's note";
}
});
Walk through one click at a time. Initially, the panel has the HTML attribute hidden, so mediaNote.hidden is true. That makes shouldOpen true. The line mediaNote.hidden = !shouldOpen assigns false, so the browser displays the panel. The button label changes to “Hide the artist’s note.” On the next click, the panel is visible, so shouldOpen becomes false. The same lines reverse the state.
Students often find ! confusing. Say “not.” The expression !true is false, and !false is true. Do not introduce more complex Boolean logic unless it is necessary for the assignment.
Instructor troubleshooting routine
- Ask the student to show the HTML ID.
- Ask the student to locate the corresponding JavaScript selector.
- Compare the two character by character.
- Check whether the script runs after the HTML has loaded.
- Open the browser console and read the first error, not just the last one.
- Temporarily reduce the script to one selector and one event listener, then rebuild it step by step.
A common error is trying to call addEventListener() on null. This usually means the selector did not find an element. It does not necessarily mean the event listener syntax itself is wrong. Check spelling, IDs, and script placement first.
Instructor discussion prompts
- What purpose does the media serve in the concept?
- Could the visitor understand the content if the video or audio failed to load?
- Does the interaction reveal useful information or merely add a decorative step?
- Can the interaction be used with a keyboard?
- What does the visitor expect the button to do, based on its label?
- Can the student explain each JavaScript line without saying only “it makes it work”?
Suggested class pacing
- 10 minutes: Review media examples and discuss intentional use of sound, image, and motion.
- 15 minutes: Demonstrate semantic HTML for image, video, and audio; discuss alt text, captions, and controls.
- 15 minutes: Walk through the caption-change JavaScript example line by line.
- 10 minutes: Demonstrate the open/close toggle and explain true/false in context.
- Studio time: Students sketch, build, test, and revise their multimedia experiment.
- Closing: Ask students to explain their interaction using find → listen → respond and name one revision made after testing.