[go: up one dir, main page]

0% found this document useful (0 votes)
6 views2 pages

DAY 3 - links

The document explains key concepts related to URLs, HTTP, HTTPS, and anchor tags in HTML. It defines a URL as an address for internet resources, HTTP as the protocol for transferring hypertext, and HTTPS as a secure version of HTTP. Additionally, it describes the anchor tag and its `href` attribute for creating hyperlinks in web pages, along with an example HTML code demonstrating its use.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

DAY 3 - links

The document explains key concepts related to URLs, HTTP, HTTPS, and anchor tags in HTML. It defines a URL as an address for internet resources, HTTP as the protocol for transferring hypertext, and HTTPS as a secure version of HTTP. Additionally, it describes the anchor tag and its `href` attribute for creating hyperlinks in web pages, along with an example HTML code demonstrating its use.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DAY 3 – Links

1. URL (Uniform Resource Locator):

- 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.

2. HTTP (Hypertext Transfer Protocol):

- 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.

3. HTTPS (Hypertext Transfer Protocol Secure):

- 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.

4. Anchor Tag (`<a>`):

- 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.

EXAMPLE CODE FOR ANCHOR TAG

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML Document with Anchor Tags</title>
</head>
<body>
<h1>Welcome to My Website</h1>

<p>This is a simple HTML document with links to other pages.</p>

<p>Click on the following links:</p>

<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 -

You might also like