Skip to main content

Html Anchor Tag

HTML Anchor Tag | Rustcode

HTML Anchor Tag

Basic Link

Create a simple hyperlink using the <a> tag.

<a href="https://example.com">Visit Example</a>

Link with Target

Open a link in a new tab using the target="_blank" attribute.

<a href="https://example.com" target="_blank">Open in New Tab</a>

Link with Title

Add a tooltip to a link using the title attribute.

<a href="https://example.com" title="Go to Example">Hover Me</a>

Email Link

Create a link that opens the user's email client.

<a href="mailto:example@example.com">Send Email</a>

Phone Link

Create a link that dials a phone number.

<a href="tel:+1234567890">Call Us</a>

Link to a Section

Link to a specific section on the same page using #id.

<a href="#section1">Go to Section 1</a>

Section 1

This is the section you can link to using the anchor tag.

Comments