How to Create a Local Web Page

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Local Web pages on your hard drive don't need Web servers to function.

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.

Advertisement

Step 1

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

Video of the Day

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>My Local Page</title> </head> <body> </body> </html>

Advertisement

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

Advertisement

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.

Advertisement

Step 3

Add this code below the previous code block:

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

Advertisement

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.

Advertisement

Step 4

Add this code below the previous code block:

<p>My Site 1</p> <a href="http://www.xyz.com" />

Replace "My Site 1" with the name of one of your favorite websites. Replace "http://www.xyz.com" with the URL of the site. Create additional links using the same format.

Advertisement

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.

Advertisement

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.

Video of the Day

Advertisement

Advertisement

references & resources