Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Embedding Audio | Integrating Media and Navigation
HTML Text and Media Foundations

bookEmbedding Audio

The <audio> element lets you embed sound files directly into your web pages. By adding the controls attribute, you allow users to play, pause, and adjust the volume of the audio. To maximize compatibility across browsers, you should provide multiple audio formats—commonly MP3, OGG, and WAV—using nested <source> elements. If a user's browser does not support the <audio> element, always include fallback text so users know audio content is present but unsupported.

index.html

index.html

copy

To ensure your audio content is accessible, always provide a transcript. A transcript is a written version of the audio, allowing users with hearing impairments to access the information. This is essential for inclusivity and meets web accessibility guidelines.

question mark

Why should you provide a transcript for audio content on your web page?

Select the correct answer

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 1

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you show me an example of how to use the `<audio>` element with multiple sources?

How do I write a good transcript for my audio content?

What are some best practices for making audio content accessible?

Awesome!

Completion rate improved to 6.25

bookEmbedding Audio

Pyyhkäise näyttääksesi valikon

The <audio> element lets you embed sound files directly into your web pages. By adding the controls attribute, you allow users to play, pause, and adjust the volume of the audio. To maximize compatibility across browsers, you should provide multiple audio formats—commonly MP3, OGG, and WAV—using nested <source> elements. If a user's browser does not support the <audio> element, always include fallback text so users know audio content is present but unsupported.

index.html

index.html

copy

To ensure your audio content is accessible, always provide a transcript. A transcript is a written version of the audio, allowing users with hearing impairments to access the information. This is essential for inclusivity and meets web accessibility guidelines.

question mark

Why should you provide a transcript for audio content on your web page?

Select the correct answer

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 1
some-alt