What is the definition of network connection?
Link is the bridge of the Internet and the core and soul of web pages. All kinds of information on the Internet are linked together through links. It connects web files and other resources into an endless network. Links can be text, images or other web elements.
Hyperlinks, also known as web page links, can be regarded as file pointers. They use the path of the associated file to point to the local network drive or the file stored on the Internet. At the same time, they can jump to the corresponding file, or they can jump to a upper body position in the file specified in the hyperlinks. A hyperlink consists of two parts: source endpoint and target endpoint. The end with a link in a hyperlink is called the source endpoint of the link (that is, the text or image you click), and the page you jump to is called the target endpoint of the link.
Each file has its own storage location and path. The path relationship between one file and the other is the foundation of creating the link.
Link path can be divided into relative path, absolute path and root path.
Absolute path refers to the complete path including server protocol, such as http://www.wangyesheji/dreamweaver/index.html The absolute path has nothing to do with the source endpoint of the link. As long as the address of the target site remains unchanged, no matter how the file moves in the site, it can jump normally without errors, If you want to link to a page or website other than the current site, you must use an absolute path.
Relative path refers to the path from the current file location to the linked file. It is the most commonly used link form in the site. For example, Dreamweaver / main.html is the relative path of a file.
The root path is a common link form within the site, but its reference is the root directory of the site, such as "D: / / MySite / Wangye / Wangye. HTML". 4.3.1 creating text links
Text link is one of the most common hyperlinks. It uses text as the source endpoint to achieve the purpose of link. The steps to create a text hyperlink are as follows.
① Select the "insert / hyperlink" command at the location where the hyperlink needs to be inserted, and set the link text, link file and target opening mode in the opened "hyperlink" dialog box, as shown in Figure 17. ② Select the text to create a hyperlink in the web page, and directly enter the URL address or complete path and file name of the link in the "link" drop-down list box of the "properties" panel.
③ Click the button behind the "link" drop-down list box, select the file you want to link in the open "select file" dialog box, and click "OK" to link.
④ Press and hold the button behind the "link" drop-down list box, drag to the "file" panel on the right, and point to the file you want to link.
After creating a hyperlink, you need to select the opening method of the linked file in the "target" drop-down list box. There are five options, as shown in Figure 18. The meanings are as follows. _ Blank: after clicking the hyperlink text, the target endpoint page opens in a new window.
New: after clicking the hyperlink text, a new browser window will be opened and the linked file will be displayed_ The difference of blank is only reflected in some browsers.
_ Parent: after clicking the hyperlink text, the target endpoint web page is displayed in the upper browser window.
_ Self: after clicking the hyperlink text, the target endpoint web page will be displayed in the current browser window, that is, the original web page will be replaced. This is the default setting of Dreamweaver, and when no selection is made, the linked file will be opened in this way.
_ Top: after clicking the hyperlink text, the target endpoint web page is displayed in the top browser window. 4.3.2 creating image links
There are two types to create image hyperlinks. One is basically the same as text hyperlinks. After selecting an image, you can set the hyperlinks in the link text box of the properties panel; The other is to create multiple hot spots on the same image, then select these hot spots respectively, and set the hyperlink in the "link" text box of the "properties" panel. When the user clicks a hot spot, it will automatically link to the corresponding web page.
To create an image hotspot area, after selecting the image, use the hotspot creation tool in the lower left corner of the property panel to create the hotspot area, as shown in Figure 19. The following describes the hot tools and how to use them.
Pointer hotspot tool: This tool is used to operate hotspots, such as selecting, moving and adjusting the range of image hotspots.
Rectangle hotspot tool: used to create regular rectangle or square hotspot area. After selecting the tool, move the mouse pointer to the upper left corner of the selected image where you want to create a rectangular hot spot area, hold down the left mouse button, drag it to the lower right corner to cover the whole hot spot area, and then release the mouse to complete the creation of the rectangular hot spot area, as shown in Figure 20.
Circular hot spot tool: used to draw circular hot spot area. Its usage is the same as that of rectangular hot spot tool, as shown in Figure 21.
Polygon hotspot tool: used to draw irregular hot spots. After selecting the tool, position the mouse cursor to a certain position of the area to be drawn on the selected image and click. Then position the mouse cursor to another position and click again to repeatedly determine each key point of the hot spot area. Finally, return to the first key point and click to form a closed area to complete the drawing of the polygon hot spot area, As shown in Figure 22, the polygon hot spot area is drawn. 4.3.3 creating anchor links
Sometimes the web page is very long, in order to find the target, we have to drag the scroll bar up and down to browse the whole document, which wastes a lot of time. Anchor link can precisely control the visitor's location after clicking the hyperlink, so that visitors can quickly browse to the designated location.
The creation of anchor link is divided into two parts: creating anchor and creating link. The specific operation steps are as follows.
① Open the web document, place the cursor at the position where you want to insert the anchor, and then select Insert / named anchor. Enter the name of the anchor in the named anchor dialog box, and then click OK, as shown in Figure 23.
After the anchor is created, a tag is displayed at the anchor location, as shown in Figure 24. ② Select the text, image or other web page elements as links, and enter "#" and anchor name in the "links" drop-down list box of the "properties" panel, such as "#" M01 ". If the source endpoint and the anchor are not in the same web page, you should first write the path and name of the web page, and then add the prefix "#" and the anchor name, such as "info. HTML # M01", and then select the way to open the web page in the "target" drop-down list box, as shown in Figure 25. After completing the anchor link, click the source endpoint of the link in the web page to jump to the corresponding named anchor immediately. 4.3.4 create email link
The e-mail link enables the browser to start the e-mail client and send e-mail to the specified mailbox. When the user clicks the hyperlink to the e-mail address on the browser, the new e-mail window of the default e-mail manager will be opened, in which the user will be prompted to input information and send it to the specified e-mail address.
The specific steps to create an email link are as follows:
Open the web document, place the cursor at the position where you want to insert the e-mail link, select the insert / e-mail link command, open the e-mail link dialog box, enter "contact me" in the text box of the dialog box, and enter "contact me" in the e-mail text box“ firstname.lastname@example.org ”, as shown in Figure 26.
When the user clicks the email link, the default email client in the computer will be opened. In the client window, the address specified by the recipient in the link will be filled in automatically.