This time I will show you how to use the base tag, what are the precautions when using the base tag, the following is a practical case, let's take a look. The
Normally, the browser will extract the corresponding elements from the URL of the current document to fill in the gaps in the relative URL.
Use the
Test:
1: The link path placed in front of the base tag can use a relative path and is relative to the current path,
but the link placed after it will use a relative path. The path specified relative to base.
2: After using the base tag, the relative path of the link in the body will be relative to the path specified by base.
3: After using the base default target, the subsequent opening method will be opened in the method specified by base, unless the opening method is defined later.
Summary: base actually defines a default address and default target. The subsequent link elements will all work
I believe you have mastered the method after reading these cases. For more exciting information, please pay attention to the php Chinese website Other related articles!
Related reading:
How to use image to submit form
How to use anchor points in html web pages
What are the ways to hide HtmL elements
What is the difference between div and span
The above is the detailed content of How to use base tag. For more information, please follow other related articles on the PHP Chinese website!