![]() |
![]() |
General discussion of site Learning HTML Planning and building Going live HTML editors Web development resources Ongoing skills development Web databases |
Learning HTML Hypertext links
This section looks at:
Hypertext links are created with the <A> tag. The opening tag always contains additional attributes and information about the link. The two most commonly used attributes are HREF and NAME.
Linking to other web pages in your site To create a link to another web site, the <A> tag is used with the HREF attribute.
Clicking on the underlined link will take you back to the main web development workshop page. A link to another page in the same directory of a web site can be broken down as follows:
Note the quotation marks enclosing the name of the file, and that file names are case sensitive. Links to other web site are created using a procedure similar to that outlined above:
A link to an external web site can be broken down as follows:
Note the quotation marks enclosing the URL, and that URLs are case sensitive. Linking to sections within a document It's often useful to be able to jump from section to section within a long document - for example from an item in a table of contents to the section it refers to. Step 1. In order to create links within one document, you need to create "bookmarks" or "targets" within the document. This is done by using the NAME attribute within the <A> tag to mark the place in the page you wish to bookmark:
Step 2. Once the bookmarks have been created, you can link to them using a format similar to that used to link to other pages and web sites:
Clicking on the above link will take you to the top of this page. The <A> tag can also be used to create links which allow you to send e-mail messages directly from a web page:
If your browser is set up to send e-mail, clicking on the link above will bring up a window in which to compose an e-mail message. For additional information about linking see the NCSA HTML Primer: http://www.ncsa.uiuc.edu/ General/Internet/WWW/ HTMLPrimerAll.html.
|
|||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||