Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views4 pages

HTML Sop4 (Link) Journal Writeup

The document outlines an experiment for a class on using hyperlinks in HTML to create a webpage detailing student demographics. It includes example code for two HTML pages, page1.html and page2.html, demonstrating how to link them using the <a> tag. Additionally, it explains the concept of hyperlinks, their attributes, and the default colors associated with them in HTML.
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)
44 views4 pages

HTML Sop4 (Link) Journal Writeup

The document outlines an experiment for a class on using hyperlinks in HTML to create a webpage detailing student demographics. It includes example code for two HTML pages, page1.html and page2.html, demonstrating how to link them using the <a> tag. Additionally, it explains the concept of hyperlinks, their attributes, and the default colors associated with them in HTML.
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/ 4

2023-2024

COMMERCE

Standard :XI Batch :- _______


Expt. Title :- Use Of Hyperlink on webpage Roll No :- _____
Expt.No :-4
Performed On :-_____________ Submitted On:- ________

Aim:Use Of hyperlink on webpage.

Write a program using HTML with the following specification.

 A webpage with details about a class with total number of students-100,


(Boys -50, Girls- 50) in tabular form.
e.g.

page1.html

 Link this page to another page as follows.

page2.html

Software Requirements: Notepad, Internet Explorer.

1 | Page
2023-2024

Code:
page1.html
<!doctype html>
<html>
<head>
<title>Details of Div A Students</title>
</head>
<body bgcolor=grey text=white>
<center>
<h1> Class Details </h1>
<table border=2 width=70% bordercolor=red>
<caption> Div A</caption>
<tr>
<th>Total Number of Students</th>
<th>Boys</th>
<th>Girls</th>
</tr>
<tr align=center>
<td>100</td>
<td>50</td>
<td>50</td>
</tr>
</table>
<br><br>
<a href=page2.html>Page2</a>
</center>
</body>
</html>
Output:

2 | Page
2023-2024

page2.html
<!doctype html>
<html>
<head>
<title>Details of Div A Students</title>
</head>
<body bgcolor=cyan text=brown>
<b>STD-XI</b>
<br>
<i>Stream-Science</i>
<br>
<a href=page1.html>Div – A</a>
</body>
</html>

Output:

General Explanation about the Experiment:

 Hyperlinks are used to connect one document with another document.


 When you open any website and click on a text or an image it takes you to
that page. It is known as hyperlink.

 In HTML, Links are created by using <a> tag.

3 | Page
2023-2024

Attribute of <a> Tag:


href: The href attribute is used to specify address of the file (URL) which
needs to be opened on clicking.

There are two types of hyperlink


1. Text hyperlink
Syntax :
<a href = page1. html> Click here for my page </a>
2. Image hyperlink :
Many websites have images as hyperlink.

Syntax :
<a href =page1.html>
<img src =arrow.gif alt = "Click on arrow">
</a>

HTML Link colours :

A hyperlink by default appears blue in colour with an underline.

 An unvisited link is underlined and blue.


 A visited link is underlined and purple.
 An active link is underlined and red.

4 | Page

You might also like