DAY 3 - links
DAY 3 - links
- A URL is a reference or address used to access resources on the internet. It specifies the location
and how to access a resource, such as a web page, image, file, or service.
- A typical URL consists of several components, including the protocol (e.g., "http://" or "https://"),
domain name (e.g., "www.example.com"), port (if specified), path (the resource's location on the
server), and optional query parameters.
- HTTP is a protocol used for transferring hypertext (text with links) over the internet. It defines
how web browsers and servers communicate with each other.
- HTTP is the foundation of data communication on the World Wide Web, allowing users to request
and view web pages and other resources.
- HTTPS is a secure version of HTTP that adds a layer of encryption to data transmission between a
user's browser and a web server.
- It uses SSL/TLS (Secure Socket Layer/Transport Layer Security) protocols to encrypt data, ensuring
that information transmitted between the user and the website remains private and secure.
- Websites that use HTTPS have URLs starting with "https://," and they are commonly used for
online banking, e-commerce, and other secure transactions.
- The `<a>` tag, also known as the anchor tag, is an HTML element used to create hyperlinks or links
within web pages.
- It allows users to click on text or images to navigate to other web pages or resources, either on
the same website or on external websites.
- The anchor tag is one of the fundamental elements for building a connected web, enabling users
to explore content across the internet by following links.
5. `href` Attribute:
- The `href` (hypertext reference) attribute is an attribute of the `<a>` tag that specifies the URL or
destination to which the link points.
- It defines the target of the hyperlink, indicating where the user should be directed when they
click on the link.
- Example: `<a href="https://www.example.com">Visit Example</a>` creates a link to the
"www.example.com" website, and the text "Visit Example" becomes the clickable link.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML Document with Anchor Tags</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<ul>
<li><a href="page1.html">Page 1</a></li>
<li><a href="page2.html">Page 2</a></li>
<li><a href="page3.html">Page 3</a></li>
</ul>
</body>
</html>
OUTPUT -