0
0
HTMLmarkup~20 mins

Media formats overview in HTML - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Media Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Which media format is best for high-quality photos with transparency?
You want to display a photo on a website that has transparent areas and needs to look sharp. Which image format should you choose?
APNG
BJPEG
CGIF
DBMP
Attempts:
2 left
💡 Hint
Think about which format supports transparency and good quality.
📝 Syntax
intermediate
2:00remaining
What is the correct HTML tag to embed an audio file?
You want to add an audio file to your webpage that users can play. Which HTML snippet is correct?
HTML
<audio src="song.mp3" controls></audio>
A<sound src="song.mp3" controls></sound>
B<audio src="song.mp3" controls></audio>
C<audio href="song.mp3" controls></audio>
D<media src="song.mp3" controls></media>
Attempts:
2 left
💡 Hint
Check the correct tag name and attribute for audio files.
rendering
advanced
2:00remaining
What will the browser display with this video tag?
Consider this HTML code:
<video width="320" height="240" controls>
  <source src="movie.webm" type="video/webm">
  <source src="movie.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

What will the user see if their browser supports MP4 but not WebM?
AThe video from movie.mp4 will play.
BThe text 'Your browser does not support the video tag.' will show.
CThe video from movie.webm will play.
DNo video or text will appear.
Attempts:
2 left
💡 Hint
Browsers try sources in order and pick the first supported format.
selector
advanced
2:00remaining
Which CSS selector targets all video elements with a 'controls' attribute?
You want to style all <video> tags that have the controls attribute. Which CSS selector is correct?
Avideo > controls
Bvideo.controls
Cvideo[controls]
Dvideo#controls
Attempts:
2 left
💡 Hint
Attribute selectors use square brackets.
accessibility
expert
2:00remaining
How to make an image accessible for screen readers?
You have an image that shows a company logo. Which HTML snippet best helps screen readers understand the image?
A<img src="logo.png">
B<img src="logo.png" title="Company logo">
C<img src="logo.png" aria-hidden="true">
D<img src="logo.png" alt="Company logo">
Attempts:
2 left
💡 Hint
Screen readers rely on a specific attribute to describe images.