How do you create a hyperlink in HTML?

Asked 10 months ago Modified yesterday Viewed 53 times Asked By Rahul Sharma
1
A hyperlink is created using the tag with an href attribute that defines the link target. Example: Click here. Clicking the link takes the user to the specified URL or page.

Answers

0

To create a hyperlink in HTML, you use the <a> (anchor) tag. The href attribute specifies the URL of the page the link goes to.

Basic Syntax:

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

Explanation:

  • <a>: The anchor tag.

  • href="...": The URL or link destination.

  • The text between <a> and </a> is what users will click.

Example:

 
<a href="https://www.openai.com">Visit OpenAI</a>

This creates a clickable link that says “Visit OpenAI” and takes the user to https://www.openai.com.

Let me know if you want to open the link in a new tab or link to an email, file, or section on the same page!

 
Answered by naveen020 Kolluri 9 months ago

Your Answer