HTML grammar teaching link tag

xiaoxiao2021-03-05  21

[WWW link tag basic concept]

Connection Basic Concept: In general, the so-called link is that some words in the web page will have special colors, and there will be a line under the word, when the cursor is moved on those words, it will turn into a finger shape, press, It will be even more articles or websites, just like this (above this is to give super novice ...). It is best to see the 'internal link' and 'external link', the so-called 'internal link' is the connection between the website of our website, as for the external link, we will discuss it later. To learn about internal links, you must first understand these two things, one is 'relative path', one is 'absolute path'. Now suppose one situation: we design web pages in your computer, all web-related files we are in C: / WWW, now suppose C: / WWW currently has index.htm, text1.htm, p1.gif, P2.GIF four files. OK! Now we want to set up a link in Index.htm, you can press TEXT1.HTM, what should we do? Basically, there are two middle ways can be done, plus any of the following descriptions in Index.htm:

this is 'absolute path' This is the 'relative path' What is the clue? Well .... Yes, 'Absolute Path' To give your computer a very detailed location, let the computer find this path to find the file. And 'relative path' is simple! If not specified, he will find directly in the directory of Index.htm, which is to find Text1.htm under C: / WWW. If we will upload all the files in the C: / WWW all the files in the C: / WWW (you can't do it only!), And the server is someone else's computer, not your own Supreme host, then the problem is coming! You guess, which link will have problems? Oh ... the answer is 'absolute path', have you guess? Why do you have a problem with the 'absolute path? Because when you upload the file to the network, your entire web directory schema will change. At that time, the computer may not find C: / (especially the Unix series host) is more likely to find the WWW directory ( Some provisions must be placed in a specific directory to display the webpage), so say, if it is fine, try to use the 'relative path' to make a link! It is not easy to make mistakes. Another situation is: In order to organize convenience, some netizens like to put the figure into the same directory, such as: C: / WWW / GIF, put two p1.gif, p2.gif, but index. HTM, Text1.htm is still under C: / WWW. Now we want to set up a set to P1.GIF under index.htm (link is not limited to only HTML file, the archive, text file can be used), then how do we use the 'relative path'? They are not in 'same directory' ...?

This is the 'absolute path' 'write What is the' relative path '? Not difficult! (It's just a bit more, see the brain swell) Total finishing: Is it chaotic? Well ... Take a look at this table, perhaps it will be clear.

The relative path representation means that the connection location text1.htm is in the current directory (on the example, it is in C: / WWW) Text1.htm In the secondary directory named DOCS (in this example, it is in C: / WWW / DOCS) text1.htm on the current directory In a layer of directory (on this example, it is under C: / bottom) [Online connection]

Instructions:

First, you want to make a marker: here is the point you want to link the point set link: Connection label tag: Sometimes When a certain page is more content, we can use the internal links of the web to make the user quickly find information. Its principles are just: Make a marker at whatever you want (anywhere in the web page!), Then, you can find information quickly when you join, you can quickly find the information. Very simple! Use example:

Sample First Step 2 Step WWW Link Label Basic Concept Want to link WWW link tag basic concept Want to link Online connection webpage connection Want to link < / a> page of external connections [connected outside]

Labeling: Connect to the outside, you can expand the practicality and enrichment of your website, and it is because of this function, it has created the WWW colorful world. Due to the service of the service on the Internet, different services have different links, I will organize them in the table below. Use example:

Website links in the site email link writing love book FTP link download file Download file news link SEEDNET News service SEEDNET GOPHER service BBS link SEEDNET GOPHER service SEEDNET BBS service [Connection tag parameter] Usage: Add Target = _ parameter tag loan after connecting: The parameter tag is not much, common Probably the Target This parameter, Target means 'target', which is the pointing target of the web page, this parameter is especially important in the frame window! Use example:

Target = box window Name: This is also mentioned in the 'framework label', and it is only available in the frame (box or frame). Normally, the frame window has its own name, so we can use this tag to specify which frame window displayed in the connection. Target = _blank: The content of the connection will be opened in the new browsing window. Target = _Parent: Take the connection screen as the previous screen of the file. Target = _SELF: The contents of the connection are displayed in the current window. TARGET = _TOP: This parameter can solve the newly connected picture content, the troubles surrounded by the old frame window, use this parameter, will redistribute the entire screen into a connection screen content.

转载请注明原文地址:https://www.9cbs.com/read-32096.html

New Post(0)