How to Create a Local Web Page

Before purchasing a domain name and setting up a website with an Internet Service Provider (ISP), consider using local web pages to perform simple web-related tasks. Local web pages allow you to create useful web applications, photo galleries and media players that run in your browser. You can even bookmark them for quick access. Local web pages are also useful for dissecting other websites and enhancing your web development skills.

Local Web pages on your hard drive don't need Web servers to function.

Step 1

Open an HTML editor or Notepad and paste the following code into a new document.

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns=""> <head> <title>My Local Page</title> </head> <body> </body> </html>

This will create an empty HTML document with no elements or controls.

Step 2

Add the following code below the <body> tag:

<p>My Song 1</p> <embed src="xyz.mp3" width="200" height="30" />

This embeds a music player in the web page. Replace "My Song" with a name describing an audio file on your hard drive or on the Web. Replace "xyz.mp3" with the actual file name or URL of the audio file. Adjust the height and width parameters to control the dimensions of the player.

Step 3

Add this code below the previous code block:

<p></p><img src="myImage1.jpg" /> <p></p><img src="myImage2.jpg" />

This places two images on the page. Replace "myImage1.jpg" and "myImage2.jpg" with the names of two images on your hard drive or the URLs of image files on the Web. To create an image gallery, create additional <img> tags that point to other image files.

Step 4

Add this code below the previous code block:

<p>My Site 1</p> <a href="" />

Replace "My Site 1" with the name of one of your favorite websites. Replace "" with the URL of the site. Create additional links using the same format.

Step 5

Save the file with an extension of .html. This creates an HTML file that your browser will recognize as a web page.

Step 6

Open your browser and select "File" and then "Open." A File Selection window will appear.

Step 7

Navigate to the HTML file and select it. Click "OK" to close the window. The local web page will open and display your headings, text, music players, photographs and links. Click the play button on the audio to make it play.

Step 8

Bookmark the page. Access it in the future by selecting the bookmark.


This is a simple example that illustrates the technique used to add useful objects and controls to a simple local web page. Add additional music players to create a playlist. Add more <img> tags to create a photo library. Create a personal start page by adding more links to websites. Customize page using other HTML elements, controls and style sheets. Click "View" and then "Source" to view the source of any web page on the Internet. Copy the source code and paste it into a blank HTML file and save it. You can then study the code and learn new coding techniques.

references & resources