Home > Web Front-end > HTML Tutorial > How to set up links between pages? _html/css_WEB-ITnose

How to set up links between pages? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:19:57
Original
1155 people have browsed it

For example, I developed two web pages A and B using Dreamweaver. How do I set the link from A to B so that the page link sent to the server is valid?

Who can tell me in detail, thank you!


Reply to the discussion (solution)

B
Check it when sending it to the server Where are they placed?
Do you know the path?

Rules for relative paths
If A.htm and B.htm are in the same directory, that is, the same folder, then B.htm in A.htm can find the B page
If A is in The parent directory of B, then xxx/B.htm in A can find B, and ../A.htm in B can find A

Rules for relative paths
If A.htm , B.htm is in the same directory, that is, the same folder, then B.htm in A.htm can find the B page
If A is in the upper directory of B, then xxx/B.htm in A can be found B, you can find A in ../A.htm in B.



is what the local link looks like. There is no need to modify it before sending it to the server. Am I right?

Quoting the reply from wzs_xyz on the 2nd floor: Rules for relative paths
If A.htm and B.htm are in the same directory, that is, the same folder, then B.htm in A.htm can find B Page
If A is in the upper directory of B, then B can be found in xxx/B.htm in A, and A can be found in ../A.htm in B



That’s it What does a local link look like? There is no need to modify it before sending it to the server. Am I right?
The relative path on the server follows the same rules, but there is one more way, which is the relative path starting from the root directory of the virtual path, such as:
/web/A.htm, this path can find the virtual path A.htm in the web folder in the root directory, no matter where this path is written

Man, you should buy this book and read it. Don’t ask all the questions. Although it’s right to ask, it’s best to study hard on your own first.
I said it a bit more directly, but you petrified everyone too much.

The simplest method, for example, there are two pages of HTML files,
One is called a.html and the other is called b.html.
To link to b.html in a.html, you can:

Add code in a.html: Click this link to go to b .html
Upload a.html and b.html to the server and put them in the same folder.

In addition, it should not be posted in the css section

There is a link in page A pointing to page B (A and B are not in the same directory)

Open page B

is how the local page link is written. It does not need to be modified before sending it to the server. Am I right?

Is what I said correct?

Is what I said correct?

Write the complete path

The local page link and the link placed on the server are the same, provided that a relative path is used. If it is an absolute path, it will need to be modified when placed on the server.

The local page link and the link placed on the server are the same, provided that a relative path is used. If it is an absolute path, it will need to be modified when placed on the server.

I use a relative path

Quoting the reply from athrunzero on the 10th floor: The local page link and the link placed on the server are the same, provided that the relative path is used. If it is an absolute path, it will need to be modified when placed on the server.

I use a relative path
If the path is relative, the link uploaded to the server does not need to be modified.

As long as there are no problems with local testing, it will be fine.

Get this basic html tutorial first to see if it will be more practical

Get this basic html tutorial first to see if it will be more practical

I read it, but it didn’t introduce this knowledge. Click

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template