"WWW link label basic concept"
Link Basic concept: In general, the so-called link is, in the Web page some words will have a special color, and the word will have a line, when the cursor moved to those words, will become a finger shape, press down, will be linked to other articles or sites, like this (the above paragraph is for the Super novice to see ...) )。
Pull to the link, the most basic view of the ' internal link ' and ' external link ', the so-called ' internal link ' is the link between their own web site, as for the external links we will discuss later.
To understand the inner link, you must first understand these two things, one is ' relative path ', one is ' absolute path '.
Now suppose a situation: we design the Web page in our own computer, all the pages related files we all put in c:www inside, now assume c:www inside now have index.htm, text1.htm, P1.gif, p2.gif these four files. Ok!
Now we want to set a link inside the index.htm, can click to connect to text1.htm, then what should we do? Basically, there are two ways to do this, and add any of the following narratives to the index.htm:
<a href= "/c|/www/text1.htm" >
This is the ' absolute path '
<a href= "Text1.htm" >
This is the ' relative path '
Do you see what's on the horizon? Yes, well .... Yes, the ' absolute path ' should give the computer a very detailed location, so that the computer will find the path to locate the file. And the ' relative path ' is much simpler! If not specifically specified, he will be directly in the index.htm directory to find, that is, under C:www to find text1.htm.
If we say, today we will c:www all the files uploaded to the Web page server (the total can not be done only to see for themselves!) , and the server is someone else's computer, not your own set up the host, then the problem comes! What kind of connection is going to go wrong, you know? Oh... The answer is ' absolute path ', do you guess right?
Why is the ' absolute path ' going to go wrong? Because, when you upload the file to the Web, your entire Web page directory architecture will change, then, the computer may not find C: (especially the UNIX series of hosts) is more likely to be unable to find the WWW directory (some will be required to be placed in a specific directory to display the page), so say, nothing, try to use ' Relative path ' to make a connection! Good writing is not easy to make mistakes.
Another situation is: In order to facilitate the arrangement, some netizens like to put all the pictures in the same directory, such as: C:wwwgif under the p1.gif, p2.gif two map, and index.htm, Text1.htm still under the c:www. Now we want to have a link to the P1.gif in index.htm (links are not limited to HTML files, graphics, text files), so how do we use the ' relative path '? They are not in the ' same directory ' ...?
<a href= "/c|/www/gif/p1.gif" >
This is the ' absolute path '.
<a href= "Gif/p1.gif" >
It's a ' relative path '.
How is it? It's not hard! (Just a little more words, see brain bloated)
Total collation: Is it messy? Well... Look at this watch, maybe it will be clearer.
Relative path representation
Represents the link location
<a href= "Text1.htm" >
Text1.htm in the current directory (for example, in c:www)
<a href= "Docs/text1.htm" >
Text1.htm in the secondary directory named docs (in this case, in C:wwwdocs)
<a href= ". /text1.htm ">
Text1.htm in the current directory in the previous level directory (in this case, is under C: below)
"Links inside the Web page"
How to use:
Mark the link first: <a name= "Here1" > here is the point you want to link </a>
Settings link: <a href= "#here1" > Links </a>
Tag commentary: Sometimes, when a page has a lot of content, we can use the internal links of the page, so that users quickly find information. The principle is simply: to make a mark on the link (anywhere on the page!) And then, when the link is found, you can quickly find the data. It's simple!
Use Example:
Example
First step
Second Step
WWW link label Basic concept
<a Name= "M1" > Want to link to location </a>
<a href= "#m1" >www link label basic concept </a>
Links within the Web page
<a name= "m2" > Want to link to location </a>
<a href= "#m2" > Links inside the page </a>
Links outside of web pages
<a name= "M3" > Want to link to location </a>
<a href= "#m3" > Links outside the website </a>
"Links outside of Web pages"
Use Example:
Website link
Good station
<a href= "http://sunspot-design.com" > Good station </a>
Email links
Write a love letter to me
<a href= "mailto:tad@ms1.url.com.tw" > Write a love letter to me </a>
FTP link
Download file
<a href= "ftp://ftp.ntu.edu.tw" > Download archive </a>
News link
SeedNet News Service
<a href= "news:news.seed.net.tw" >seednet News service </a>
Gopher link
SeedNet Gopher Service
<a href= "gopher://gopher.seed.net.tw/" >seednet Gopher service </a>
BBS Link
SeedNet Gopher Service
<a href= "telnet://bbs.seed.net.tw/" >seednet BBS service </a>
"Parameter of the link label"
How to: Add the target=_ parameter after the link
Tag explanation: The link parameter is not many, the common probably is the target this parameter, Target's meaning is ' the target ', also is the webpage link target, this parameter is particularly important in the frame window (frame)!
Use Example:
target= Box window Name:
This is also mentioned in the ' frame tag ' and is only used in frames (box windows or frame). Normally, the box window has its own name, so we can use this tag to specify which box window the link's contents are displayed in.
Target=_blank:
will be linked to the content of the screen, open in the New browsing window.
Target=_parent:
will link the screen content, as a file of the previous screen.
Target=_self:
The contents of the linked screen are displayed in the current window.
Target=_top:
This parameter can solve the new linked screen content, surrounded by the old box window, using this parameter, will be the whole picture back to the linked screen content.