Href= "#xxx" in a tag jumps to id= "xxx"

Source: Internet
Author: User

HTML in a tag href= "#xxx", when clicked, the page will jump to the label id= "XXX" place. At the same time, at the end of the URL you will see the addition of #xxx, which directly changes the value in the URL after the #, and then the page can jump to the tag in the ID of this value place. Test code:
<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Document</title><style>P{Height:700px;}</style></Head><Body>    <ahref= "#xxx">Tab1</a>    <ahref= "#b">TaB2</a>    <ahref= "#c">Tab3</a>    <P>Pp<em>Pppp</em>Pp</P>    <H2ID= "XXX">Tag1</H2>    <P>111111111</P>    <H2ID= "B">Tag2</H2>    <P>111111111</P>    <H2ID= "C">Tag3</H2>    <P>111111111</P></Body></HTML>

Href= "#xxx" in a tag jumps to id= "xxx"

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.