HTML Beginner's Guide (7)

Source: Internet
Author: User
Tags format contains ftp include gopher resource first row port number
Beginner
URLs
The World Wide Web uses standard resource positioning uniform Resource Locators (URLs) to indicate files in other servers. A URL includes the type of access to the resource (for example, Web, Gopher, WAIS), the address of the server, and the location of the file. The syntax format is:

Scheme://host.domain [:p Ort]/path/filename

Scheme is one of the following

File
A file on the local system
Ftp
Files in an anonymous FTP server
http
Files in the World Wide Web server
Gopher
Gopher files in the server
WAIS
WAIS files in the server
News
A newsgroup in Usenet newsgroup
Telnet
A connection to a Telnet-based service
Port number can usually be omitted. (unless the other person tells you to use it, otherwise ignore it)

For example, link this guide in your document:

<a href= "http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html ";>
NCSA ' s beginner ' s Guide to html</a>

It marks the text NCSA ' s beginner ' s Guide to HTML as a hyperlink, linked to the current document.

Links to the specified section
The anchor chain can also be used to guide the reader to a specific area in a document (which can be the current document or other document), not necessarily to the default top position. This type of anchor is often referred to as a named anchor chain named Anchor, because when you create a link, you need to insert an HTML name into the document.

This guide is a good example of using named anchor chains in the same document. It is made into a document for easy printing. But when you're just trying to get a piece of information about HTML, it's time consuming to browse through a (long) document. The internal hyperlink is used to create a "content index Table of contents" at the beginning of the document. These hyperlinks allow you to move from one location in the document to another. (at the top of this article, click the link in the content index to the specified section.) You'll be back here.

You can also link to a specific section in another document. The first thing to mention is that this will help you understand the links within a document.

Links between specified sections in different documents
Suppose you want to create a link from document A (documenta.html) to a specified part of another document (mainestats.html).

Enter HTML encoding to point to a named link:

Documenta.html:

In addition to the many state parks, Maine are also home to
<a href= "MAINESTATS.HTML#ANP" >acadia national park</a>.

The string following the pound sign (#) can be considered a label in the file mainestats.html. This tab shows where the browser starts when the link is activated. In the example above, the first row shown is Acadia National Park heading.

The second step is to create a named anchor chain in mainestats.html (in this case, "ANP")


After all these elements are done, you can let the reader directly find the reference information of the Acadia in Mainestats.html.

Note: To link to a specified location in another document, you need to have write permission on that document, or the document already contains a named anchor chain inside the document. For example, you can include a link to this guide in your document because it already contains a named anchor chain (use the view Source in the browser to look at the code). But if this document does not have a named anchor, you cannot create a link to a specific location because you cannot edit the original file in the NCSA server.

Link to the specified part of the current document
The syntax is the same as the previous text, except that the filename is omitted.

For example, to link to the ANP from the Mainestats:

... More information about <a href= "#ANP" >acadia National park</a>
is available elsewhere into this document.

Be sure to include the <a name=> tag (
This is useful when you think that the reader may need to print all the documents, or that there are many short messages in one file that need to be explained online.

Mail Send mailto
Include the mailto attribute in the hyperlink to make it easy for the reader to send e-mail to a person or alias. The format is:

<a href= "Mailto:emailinfo@host" >Name</a>

For example, enter:

<a href= "mailto:pubs@ncsa.uiuc.edu" &GT;NCSA Publications group</a>

You can create a mail window that is already configured to send to Bupt publications group. (You should certainly switch to another address!)


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.