LinksBasically, the link function is to move the reading to a target when it is selected:the target may be another point of the same page, another page or site, or a file. Link to a web siteThe link tag needs always:
For example:
Visit the <A HREF="http://www.nasa.gov">NASA website</A>
Visit the NASA website
Linking pages togetherA number of HTML files can be joined as book pages using links.In fact, you can think to a web site as to a book. See, for example, these two HTML documents, one.htm and two.htm. one.htm has a link to two.htm and vice versa. Clicking on the links, the reader will shift from one document to the other. <HTML> <HEAD><TITLE>Page 1</TITLE></HEAD> <BODY> <P> This is the <A HREF="two.htm">link to page two</A>. </P> </BODY> <HTML> <HTML> <HEAD><TITLE>Page 2</TITLE></HEAD> <BODY> <P> This is the <A HREF="one.htm">link to page one</A>. </P> </BODY> <HTML>Try this:
Link to download or view a fileWe can put a link to any kind of file to let you view or download it.Specify the file name and, if needs, his path:
<A HREF="files/docs.zip">Download the documentation (ZIP)</A>
Go to a point of a pageWe can put a link to any point in the same page or in another.We need to give a name to the target point and write a tag in the start point and a tag in the target point. <A HREF="#endpoint">Go to the end point!</A> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <A name="endpoint">This is the end point..</A> Go to an element of a pageWe can put a link to another element (an heading, a paragraph, a list and so on) in the same page or in another.We need to mark the element with an identificator (id), write a tag in the start point and a tag in the target point. <A HREF="#chapter1">Go to the first chapter!</A> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <H1 id="chapter1">Chapter 1</H1> Use an image as a linkThe combination of an image and a link is useful:Click the thumbnail to see my house: <A HREF="house.jpg"><IMG src="littlehouse.jpg" ALT="Home thumbnail"></A> <BR><BR> Click the button to see a photo: <A HREF="flower.jpg"><IMG src="button.png" ALT="button"></A> Link to a mail addressThis kind of link has a mail address for target:
Send me a <A href="mailto:bob@mymail.com">mail</A>!
Send me a mail!
Next page : how to use tables. |