Question 6 :
How do I link to a location in the middle of an HTML document?
First, label the destination of the link. The old way to label the destination of the link was with an anchor using the NAME attribute. For example:
<h2><a name="section2">Section 2: Beyond Introductions</a></h2>
The modern way to label the destination of the link is with an ID attribute. For example:
<h2 id="section2">Section 2: Beyond Introductions</h2>
Second, link to the labeled destination. The URL is the URL of the document, with "#" and the value of the NAME or ID attribute appended. Continuing the above examples, elsewhere in the same document you could use:
<a href="#section2">go to Section 2</a>
Similarly, in another document you could use:
<a href="thesis.html#section2">go to Section 2 of my thesis</a>
Question 7 :
How do I create a link?
Use an anchor element. The HREF attribute specifies the URL of the document that you want to link to. The following example links the text "Web Authoring FAQ" to
<URL:http://www.htmlhelp.com/faq/html/> <A HREF="http://www.yoursite.com/faq/html/">Web Authoring FAQ</A>
Question 8 :
How do I create a link that opens a new window?
<p><a target="_blank" href=...></p> opens a new, unnamed window.
<p><a target="example" href=...></p> opens a new window named "example", provided that a window or frame by that name does not already exist.
Question 9 :
How do I let people download a file from my page?
Once the file is uploaded to the server, you need only use an anchor reference tag to link to it. An example would be:
<p><a href="../files/foo.zip">Download Foo Now! (100kb ZIP)</a></p>
Question 10 :
How do I create a button which acts like a link?
This is best done with a small form:
<FORM ACTION="[URL]" METHOD=GET> <INPUT TYPE=submit VALUE="Text on button"> </FORM>
If you want to line up buttons next to each other, you will have to put them in a one-row table, with each button in a separate cell.
Note that search engines might not find the target document unless there is a normal link somewhere else on the page.