Base tag for HTML

Source: Internet
Author: User

Refers to the URL of the relative link within the page, as defined in the

The use of this tag is to solve the relative path problem when programming , such as some CMS, because each page path is different, he will give you to generate <a href= "/sdsd/dsd.html" >sddsds</a>, If I am debugging locally, I will definitely open a directory locally, so it is messy, you can generate a relative path, such as <a href= "sdsd/dsd.html" >sddsds</a>, as long as the head section with <base href =http://localhost/abc/> can be.

So, this tag is primarily intended to solve some of the relative path problems of Web programming.

Of course, this base also has a usage, such as in the head section adds such a line: <base href= "_blank" >, is the default all links opens in the new window.

Base tag for HTML

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: 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.