Subscribe Us

HTML LINKS

HTML Links: Connecting Your Web Content

HTML Links: Connecting Your Web Content

What are HTML Links?

HTML links, or hyperlinks, are used to connect one web page to another, or to link to other types of resources like files or external websites. They are created using the <a> tag.

Creating Links with the <a> Tag

The <a> tag is used to create links. The href attribute specifies the URL of the page or resource the link points to. You can also use the target attribute to control how the link opens.

Example: HTML Links

Here’s an example of creating different types of links:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Links Example</title>
</head>
<body>
<a href="https://www.example.com">Visit Example.com</a>
<a href="file.pdf" download>Download PDF</a>
<a href="#section1">Go to Section 1</a>
</body>
</html>

© 2024 HTML Tutorial

No comments