<>


How to make web pages
with only basic HTML

Hyperlink code

Backup a copy of this file before copying and pasting from it.

Rename the file by changing its extension from .txt to .html.

Open this page of hyperlinks in a plain-text editor to read or edit the html coding.

View how any changes to the code look by opening the html file in a web browser.

To read the code in a browser, open the page or reload it, right-click the page and select view page source.

This is an anchor word for a hyperlink which is at the bottom of this page. Hyperlinks

The link comes back to the anchor here.

This code links a word in a sentence to a website on the internet.

Go to Yahoo search engine.

A hyperlink can be typed anywhere between the two body tags of a web page.

This hyperlink goes to a page called linkpage.htm in the same directory. Go to the linked page.

This hyperlink is the same but with only one word as the anchor. Linkpage

Check that the hyperlink and the file it refers to both have the same name and html extension. If a hyperlink back to the index page does not work, check it and put a break tag at the end of it.

Some browsers ignore links which are not typed within quote marks. Other browsers ignore quotes and still open the links. Any browser which does not understand a bit of html code will ignore that bit and go on to the next.

This hyperlink goes to a different website on the internet. Go to the EchoEcho website.

This next hyperlink goes to a page within a different website. Go to html tutorial page at EchoEcho website.

This is a small, in-line home home gif gif image in the same directory as this web page.

This image tag shows a gif image which is stored in the same directory as this page.

This image tag adds space around the image.

This hyperlink works by clicking an image and goes to a different website on the internet. Go to the Fastmail website.

Click this image tag to find and shows a gif image stored on the internet.

This hyperlink adds a boarder around the image.

Play a sound file which is in the same directory as this page with the link. Play a sound.

This link goes to an anchor called Hyperlinks near the top of this page. Go to top of this page.

This word links to an anchor near the top of this page.

Top

This link works when the arrow image is clicked.

The default border around the arrow is good as it indicates that it is a link. The border can be removed by adding the attribute border zero.

Link to a video. Play a video.

This link takes you to a special place on another web page in the same directory. It goes to an anchor called Hyperlinks which is on a page called hyperlinks.htm. Go to hyperlinks page.

The next link lets a visitor to a website download a file. Click a download link to open a file in the web browser. Then save as or download that file onto the hard drive in your computer. Here the link finds the file in the same current ./ directory as the download age. This web page and the downloads directory are both in the root directory of the website. Download blue image file

In the browser, right click the jpg image and select save image as. Then press the back arrow to come back to this page.

This html code lets a .pdf .doc or .zip file be downloaded from a page on the web. Download PDF File

Type the right name for the page to be downloaded.

A target blank attribute like this opens a linked web paged in a new tab or window. Tutorials Point

But that file is no longer available.

A link can take you to a specific page on another website. Cut the whole url to that page and paste it in as the href reference of the hyperlink.

Click this thumbnail image to link to a larger image on another page.

Then press the back arrow.

A mailto link like this lets a visitor to your website send an email to you. Send email

Such a link has been tested using Thunderbird email client, Swisscows webmail, Firefox browser and Anche webmail. Test the mail link with different browsers.

Click that link to start your email client ready to send the email.

Mailto links can bring spam. It is safer to use a mail form instead of a mailto link.

You can use an alias email address like this to keep your real address a secret from spammers and robots. Send email

That alias address has been made by Simplelogin.io. It redirects a website visitor to your real email address.

Another way to let visitors email you, is to use an image without a link. Write your email address something like this: Email username@mailserver.com Press the print screen key, crop tight around that line and make an image. Rename the image file likeuser.png. Put that email image on the web page. Visitors can read it and email you direct. Search robots cannot read what the image says. If you use an alias for an email address, you can change it easily later to avoid spam.

Building web pages with basic html code means not using any other code that may not work with basic code, including hyperlink code.

Do not use a self attribute as it is for frames. Do not use frames.

Do not use the base attribute. Instead cut and paste the full url address.

Do not use name, id or title attributes in hyperlinks.

A link that does not open the web page may need JS javascript enabled in the browser. Avoid using or allowing Javascript as it can be a privacy and security leak.

Avoid using CSS cascading style sheets, div attributes, frames, javascript, cookies, popups and any computer coding which may damage standard html or make the internet less private or secure.

HTML language is not case sensitive but it saves time to type in lowercase and not press the shift key.

If a bit of code fails, check the typing. One character typed wrong can cause the code to fail.

Go back to main page.
HTML contents list Go to top of this page.

That hash mark # says the anchor is on the same page as the link to it.
___

Copyright C Wallace William Baker, 2024, all rights reserved.

Free Web Hosting