A label, relative address, absolute address, Anchor Point technology

Source: Internet
Author: User
a label (link label)

form :

<a href= "link Address" target= "window name to open link" > Content section </a>

link address : A URL is usually used to indicate the meaning (form) of a linked address. Link addresses can be divided into:

Absolute address: means the page can be "directly" through the address. can also be divided into:

Internet Absolute Address: form is: http://domain name/directory name 1/directory Name 2/filename

Apply to: Web site (page)

Local absolute address: The form is: file:///letter:/directory name 1/directory Name 2/filename

for local sites (pages)--normally used Web sites, rarely use local absolute paths.

Typically, the local absolute path is absolutely prohibited.

Relative Address: (You can think that each relative position is omitted./)

Explanation: Refers to a relative position that corresponds to the location (folder) of the page where the current a tag is located.

Several special relative path names:

./: Directly refers to the "current directory", that is, the directory location of this file, usually can be omitted

.. /: Represents the "Up level" directory of the current directory.

./Directory Name: Represents the specified next-level directory name in the current directory

The above can be further combined, common as follows:

./p0.html

./abc/p1.html

.. /p2.html

.. /def/p3.html

.. /.. /def/abc/p4.html

Abc/def/hij/p5.html in the Hij directory in the Def directory in the current directory of the ABC directory p5.html

Small summary: Usually in practical applications, in a site within each other with relative address, if linked to external sites, you must use the absolute path of the Internet.

Not in good hands.

to open a linked window name : Specifies which window to open when the page is opened. In quotation marks that follow the target

Several fixed-meaning window names:

_self: Represents the window itself where the current page is located

_blank: Represents a "new window", that is, anyway, always open a new window to display the linked page

_parent: The parent window, in fact, is the window of the current window--the window can be nested to form a hierarchical relationship

_top: The topmost window in a window that represents the topmost level of a nested relationship

You can also set the name of the window yourself: if the window already exists, it opens in the window, and if the window does not exist, a new window is created and named and the link opens.



Anchor Point Technology

An anchor point actually refers to a "location" on a Web page.

The implementation of the anchor point: Need to use at least 2 times a tag to match the completion. The basic form is as follows:

<a href= "#锚点名" > Content section </a> ()

......... This may be a lot of content area ....

<a name= "anchor roll" > Content part </a>, no underline part is equally valid 2

Integrated application of anchor points and Links:

<a href= "link address url# Anchor" > Content section </a>

The meaning is to link to the specified Web page and navigate to the location of the specified anchor point for the page.

Eg:<aname= "Top" ></a>

<a href= "#top" style= "position:fixed;right:50px; bottom:50px; " > Back to Top </a>

Click Position to ABC to position to text 1

<a href= "#abc" > Positioning to Abc</a>

<a name= "abc" > Text 1</a>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.