Links Flashcards
What is the purpose of the href
attribute in an anchor tag?
It creates hyperlinks to locations like current pages, other pages within a site, other sites, download files, or send emails (e.g., mailto:
).
What does the download
attribute in a hyperlink do?
It indicates that the link points to a downloadable resource and suggests a filename for the download.
What are the values for the target
attribute in an anchor tag, and what do they do?
_self
: Opens the link in the same window._blank
: Opens the link in a new tab.
What is the purpose of the hreflang
attribute in an anchor tag?
It specifies the language for alternate versions of a page or link.
What does the ping
attribute in an anchor tag do?
It sends a POST
request with a PING
body to secure URLs (https
) when the hyperlink is activated, notifying the destination.