<a href="URL">click here</a>These tags must always be paired.
There are many valid types of URLs (Universal Resource Locators)
Web Page | http://www.xxx.com
http://www.xxx.com/index.html http:page_2.html http:../page_2.html http://www.xxx.com/getThis.zip | |
File on c-drive | file://c:/autoexec.bat | |
FTP | ftp://ftp.xxx.com/getThis.zip | |
ftp://UserName:Password@ftp.xxx.com/filename.txt
Used when a password is required | ||
Telnet | telnet://yyy.com
telnet://UserName:Password@yyy.com The password remains visible in the title bar | |
Send E-Mail | mailto:xxx@yyy.com | |
News Group | news:alt.xfiles |
There are numerous variations and extensions to these samples.
Notice that the reference names may contain spaces if IE 3.02 is used, but that they will fail with Netscape 3.x. Specifically, if you want portable applications, do not use spaces in any file or directory names.
Predefined Protocols
file ftp gopher http https javascript mailto news res telnet view-source
This code will display a file in notepad -
Anchors.htm
c:/autoexec.bat
view-source is available in MS Internet Explorer 4.0 and later.
In Internet Explorer 6, this code will open a Blank Browser (alt). (In Netscape, the second example provides other data.)
Links to a Location Within a Page
<A HREF="#files">Files</A> <A name="files"></A> <a href="http://www.w3.org/TR/REC-html32.html#anchor">Anchors</a>Of course, each name can only be used once per page.
<a href="Anchors.htm" target="new"> <a href="Anchors.htm" target="_blank">New window | _blank window | Same window
The target attribute is not supported in HTML 3.2.
In HTML 4.0, target is a part of frames but new is not defined.
Using IE 3.02
This can be used to define acromyms like html. (Think Shakespear with olde English help.) I suggest using a unique color to indicate defined terms.
This does not work in Netscape 4.05, it does work in Netscape 7.0.
<A HREF="http://204.122.127.80">Back to Main</A> <a href="http://www..." OnMouseOver="window.status='Status Help String';return true;"> ... </a> <a href="javascript:viewday(2000,10,10);">10</a>
<a href=http:fonts.htm>font</a> Works in Netscape, fails in IE3 <a href=fonts.htm>font</a> Works in both Netscape and IE3
<A HREF="file:///H|/Local HTML/Index.htm" ADD_DATE="868397229" LAST_VISIT="870728622" LAST_MODIFIED="868397210">Click Here</A>
<a href="file://computer-ID">click here<a>This implies that when several domains share resources, the machine names must be unique across all domains.
Remember, style sheets are browser dependent. Both examples work in IE 4.72, but neither example works in Netscape 4.05.