What does href = # In the link mean? _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
What does href # Mean? Every netizen is confused. href # is the link to the current page. For details, refer to the link to the current page.
-------------------
It is usually used as follows::
Close
Linking href = "#" means connecting to the current page is meaningless, and the page will not be refreshed. The key is the onclick next. When you click "close", the window will be executed. close () code.

You may say why it is not written to close
If the two words are written in this way, they will not be processed as superlinks, and the effect will look worse. You can try it on your own. When creating a webpage, the parameters in the html language are used to specify the url ### of the link, that is, the link to this page, and href = "Address" is the link to this page. The default page is displayed, A new window is not displayed. If # is removed when the connection is null, the mouse and hand cursor are not displayed. Generally, it is a fake link pointing to this page.
You can also keep up with the anchor id behind #. This is actually another usage of bookmarks.

Create bookmarks
Syntax: Text
Bookmarks linked to the same page (use)
Syntax: link text
Bookmarks linked to different pages
Syntax: link text (note the quotation marks and)

Under normal circumstances, click the text link of the link, and the cursor will automatically jump to the text position on this page.

But you write it as: the text of the Link without writing the bookmarked name is actually nothing to jump. Generally, only href = "#"
When the link is empty, the display will show the effect of The Link (for example, the mouse becomes a small hand), but there is no page Jump.

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.