<a href=""> link, the browser will attempt to find that resource. So what do you do?
The answer is to link to a hash / pound symbol (
#). This will give the appearance of a link, but the link won’t actually do anything. For example:
<a href="#">This looks like a link, but it really only appears that way: it won’t go anywhere when clicked on</a>
In theory you can surround anything with a hypertext reference. The most common things to link are text and images, but under the DOM, a
href can be applied to any element - tables, horizontal rules, anything.
<a> can link to anything, it’s possible to create a link to an eMail that will be automatically created when clicked on by the user:
Note that this assumes that the user has an eMail client installed and knows how to use it: be aware that not everyone does (some use a web service like Hotmail or gMail exclusively, for example). Also, this technique does tend to be picked up by “page scrapers” used by stammers to harvest eMail addresses. It's perfectly good, even advisable for a business site, but a better technique is to make a PHP form that will send the contents of a form to an eMail address. Unfortunately, we won’t arrive at that solution until next semester.
If you want to, you can even add a subject line for the eMail:
<a href=”mailto:firstname.lastname@example.org?subject=Subject Line Here”>
(Note the use of
? to separate elements in a link: it’s a particularly subtle technique that can be used to great advantage when we get to processing information with PHP.)