Loading

Quipoin Menu

Learn • Practice • Grow

html / Anchor Tag
interview

Q1. What is the <a> tag used for?
The <a> (anchor) tag defines a hyperlink, used to link from one page to another or to different sections within the same page.

Q2. What is the href attribute in the <a> tag?
The href attribute specifies the URL of the page the link goes to. It can be absolute, relative, or link to an element id.

Q3. How do you create a link that opens in a new tab?
Use the target="_blank" attribute: <a href="url" target="_blank">Link</a> opens in a new browser tab.

Q4. What is the difference between absolute and relative URLs?
Absolute URLs contain full web address (https://example.com/page). Relative URLs link within same site (page.html or /folder/page.html).

Q5. How do you create a link to an email address?
Use mailto: in the href: <a href="mailto:email@example.com">Send Email</a> opens the user's email client.