<!DOCTYPE html>
<html>
<head>
<title>Anchor Tag Example</title>
</head>
<body>
<h1>Anchor Tag Example</h1>
<p>This is a paragraph with a <a href="https://www.example.com">link to example.com</a>.</p>
<p>Click <a href="#section2">here</a> to jump to section 2.</p>
<h2 id="section2">Section 2</h2>
<p>This is the content of section 2.</p>
</body>
</html>
<a href="https://www.example.com">link to example.com</a>: This creates a hyperlink to the URL "https://www.example.com". When the link is clicked, it will take the user to the specified webpage.<a href="#section2">here</a>: This creates a hyperlink that jumps to a specific section of the same page. Thehrefattribute contains the ID of the target section (#section2). When the link is clicked, the browser will scroll to the section with the corresponding ID.
The <a> tag can also be used to link to email addresses, files, or other resources by specifying different values for the href attribute. For example:
<a href="mailto:example@example.com">Send email</a>: This creates a link that opens the default email client with the specified email address filled in.<a href="document.pdf">Download PDF</a>: This creates a link to download a PDF file named "document.pdf".
The content within the <a> tag (e.g., "link to example.com" or "here") is what the user sees as the clickable text.