Links and media: Downloadable resources
The download attribute suggests downloading a same-origin resource; meaningful text still identifies the file.
Current edit
Understand the pattern
The download attribute suggests downloading a same-origin resource; meaningful text still identifies the file.
The download attribute suggests downloading a same-origin resource; meaningful text still identifies the file.
Misconceptions to reject
- A visual appearance alone guarantees the intended HTML meaning.
- Replacing semantic elements with generic divs automatically improves accessibility.
The preview is a sanitized subset, not a full browser compatibility test.
Worked example and expected result
<a href="/notes.txt" download="workshop-notes.txt">Download workshop notes</a>
<p>Plain text for offline reading.</p>The download attribute suggests downloading a same-origin resource; meaningful text still identifies the file.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Links and media: Media fallback copyTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01Links and media: Responsive image dimensionsIntrinsic width and height let the browser reserve the image aspect ratio before loading the asset.Practice
- 02Links and media: Media fallback copyMedia needs usable alternatives. A transcript link provides access to spoken information beyond player controls.Practice