URLs
World Wide Web uses Uniform Resource Locators (URLs) to point to files on other servers. A URL includes the type of resource being accessed (e.g., Web, gopher, WAIS), the address of the server, and the location of the file. Syntax The format is:
scheme://host.domain [:port]/path/ filename
where scheme is one of the following
file
A file in the local system
ftp
A file in an anonymous FTP server
http
World File in Wide Web server
gopher
File in Gopher server
WAIS
File in WAIS server
news
A newsgroup newsgroup of Usenet
telnet
Connection to a Telnet-based service
Port The port number can usually be omitted. (Unless you are told to use it, ignore it)
For example, link to this guide in your document:
NCSA's Beginner's Guide to HTML
It marks the text NCSA's Beginner's Guide to HTML as a hyperlink, connected to the current document.
The link to the specified section
The anchor chain is also Can be used to guide the reader to a specific area in a document (either the current document or another document), not necessarily to the default top position. This type of anchor is often called a named anchor because When creating links, you need to insert HTML names into the document.
This guide is a good example of using named anchor chains in the same document. It makes a document easier to print. But when you just want to know about HTML Navigating through such a (long) document can be time consuming when only a portion of the information is included. Internal hyperlinks are used to create a "table of contents" at the beginning of the document. These hyperlinks allow you to browse from a point in the document The location is moved to another location. (Go to the top of this article and click on the link to a specific section in the content index. You will be returned here.)
You can also link to a specific section in another document. I mention this first because it will help You understand links within a document.
Links between specific sections in different documents
Suppose you want to create a link from document A (documentA.html) to a specific section in another document (MaineStats.html) link.
Enter HTML encoding to point to a named link:
documentA.html:
In addition to the many state parks, Maine is also home to
Acadia National Park. The string following the pound sign (#) can be seen as a tag in the file MaineStats.html. This tag tells the browser where to start displaying when the link is activated. Above In this example, the first line displayed will be the Acadia National Park heading.
Step 2, create a named anchor chain in MaineStats.html ("ANP" in this example)
The above is the content of HTML Beginner’s Guide (7). For more related content, please pay attention to the PHP Chinese website (www.php.cn)!