← BYTES
HTML·Intermediate·Ref: 2.2.12
What does the `download` attribute on an `<a>` tag do?
Have a question about this video? Mention reference 2.2.12 when you contact us.
a.It opens the linked resource in a new tab automatically
b.It tells the browser to download the linked resource as a file (rather than navigating to/rendering it), optionally with a suggested filename
c.It compresses the linked file before sending it
d.It is only valid when linking to image files
Adding download to an <a href="report.pdf" download> link makes the browser save that resource to disk instead of trying to display it inline -- download="custom-name.pdf" additionally lets you suggest a different filename than the one in the URL, for same-origin resources.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES2212#HTML