SimpleTuts.com

Create a local website using hyperlinks

Step 1

First Create a folder named website.

Inside it save an html file named index.html and add the below code to it


<html>
<head>
	<title>Home page</title>
</head>
<body>
	<a href="index.html">Home</a> |
	<a href="about.html">About</a> |
	<a href="contact.html">Contact</a>
	<hr>
	<h1>Home</h1>
	<img src="images/pic1.jpg" height="200">
	<p>This program is free software; you can redistribute it and/or modify it under the 
	terms of the GNU General Public License as published by the Free Software Foundation; 
	either version 3 of the License, or at your option any later version.</p>   
</body>
</html>
Run Code

Step 2

Its output will be like this

Step 3

Save another file named about.html in the same folder and add the below code to it


<html>
<head>
	<title>About page</title>
</head>
<body>
	<a href="index.html">Home</a> |
	<a href="about.html">About</a> |
	<a href="contact.html">Contact</a>
	<hr>
	<h1>About</h1>
	<img src="images/pic2.jpg" height="200">
	<p>This program is free software; you can redistribute it and/or modify it under the 
	terms of the GNU General Public License as published by the Free Software Foundation; 
	either version 3 of the License, or at your option any later version.</p>   
</body>
</html>
Run Code

Step 4

Its output will be like this

Step 5

Save another file named contact.html in the same folder and add the below code to it


<html>
<head>
	<title>Contact page</title>
</head>
<body>
	<a href="index.html">Home</a> |
	<a href="about.html">About</a> |
	<a href="contact.html">Contact</a>
	<hr>
	<h1>Contact</h1>
	<img src="images/pic3.jpg" height="200">
	<p>This program is free software; you can redistribute it and/or modify it under the 
	terms of the GNU General Public License as published by the Free Software Foundation; 
	either version 3 of the License, or at your option any later version.</p>   
</body>
</html>
Run Code

Step 6

Its output will be like this

Watch video