gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
html click url
- User
html click url
- Assistant
To create a clickable URL in HTML, you use the
<a>(anchor) tag. Here’s a simple example of how to create a clickable link:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Clickable URL Example</title> </head> <body> <h1>Welcome to My Website</h1> <p>Click the link below to visit OpenAI:</p> <a href="https://www.openai.com" target="_blank">Visit OpenAI</a> </body> </html>Explanation:
<a href="URL">: Thehrefattribute specifies the URL to which the link points. ReplaceURLwith the actual link.target="_blank": This attribute makes the link open in a new tab when clicked. You can omit this if you want the link to open in the same tab.- The text between the opening
<a>and closing</a>tags is what will be displayed as the clickable link.
Replace
https://www.openai.comand"Visit OpenAI"with any URL and text you prefer.