HTML, html tutorial

Source: Internet
Author: User

HTML, html tutorial

<Base> the tag specifies the default address or target for all links on the page.
Generally, the browser extracts the corresponding elements from the URL of the current document to fill in the blank space in the relative URL. You can use the <base> label to change the value. The browser will no longer use the URL of the current document, but will use the specified basic URL to parse all relative URLs. These include the URLs in the <a>, , <link>, and <form> labels.

Sample Code:

<Head> <base href = "http://www.w3school.com.cn/ I/"/> <base target = "_ blank"/>  

Here, the src attribute of the element is relative path. By default, you should use the path of the current document to expand this relative path. However, since the <base> element specifies the default address of the link, the basic path is extended with a http://www.w3school.com.cn/ I. Therefore, the actual value of the element src attribute is http://www.w3school.com.cn/ I /eg_smile.gif.
Similarly, the <base> element also specifies the default Link Target as _ blank. Therefore, when the <a> element does not specify the target attribute, the value of target is _ blank instead of the default _ self.

Related Article

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.