Home Web Front-end CSS Tutorial Detailed explanation of base href usage_Basic tutorial base href usage

Detailed explanation of base href usage_Basic tutorial base href usage

May 16, 2016 pm 12:06 PM
base href Instructions Detailed explanation

it is often used in frame structures, such as the left and right frames. all the connections in the files in the left frame are displayed in the right frame. just use the base tag and write its target attribute value as the name of the right frame. this eliminates the need to specify the target attribute for each connection in the file in the left frame.

other instructions for base href tags:
1. when used, the base element must appear in the head of the document, before any reference to external sources.
2. this element is available in html of microsoft® internet explorer 3.0 and in scripts of internet explorer 4.0.
3. this element will not be rendered. ​
4. this element does not require a closing tag.
5. the base tag is actually useful. for example, will cause all the links on this page to open in a new page, so there is no need to add target="_blank" at each link. .

note in ie7:
1. no additional output characters can be added before . otherwise, ie7 will not parse base.
2. is a link base mark, used to change the default parameter values ​​of all link marks in the file. it can only be adapted to the beginning of the file, that is, between the tags and .

1

2

3

4

5

6

7

8

9

10

11

<html>   

<head>   

<base href=http://www.php.cn target="_blank">   

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">   

<title>base href用法</title>   

</head>   

<body>   

<a href="1.php">1.asp</a>   

<a href="2.php">2.asp</a>   

</body>   

</html>

Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use DirectX repair tool? Detailed usage of DirectX repair tool How to use DirectX repair tool? Detailed usage of DirectX repair tool Mar 15, 2024 am 08:31 AM

How to use DirectX repair tool? Detailed usage of DirectX repair tool

Detailed explanation of obtaining administrator rights in Win11 Detailed explanation of obtaining administrator rights in Win11 Mar 08, 2024 pm 03:06 PM

Detailed explanation of obtaining administrator rights in Win11

Base DEX Faucet: Aerodrome VS Curve Base DEX Faucet: Aerodrome VS Curve Mar 26, 2024 pm 04:31 PM

Base DEX Faucet: Aerodrome VS Curve

How to use Baidu Netdisk-How to use Baidu Netdisk How to use Baidu Netdisk-How to use Baidu Netdisk Mar 04, 2024 pm 09:28 PM

How to use Baidu Netdisk-How to use Baidu Netdisk

Detailed explanation of division operation in Oracle SQL Detailed explanation of division operation in Oracle SQL Mar 10, 2024 am 09:51 AM

Detailed explanation of division operation in Oracle SQL

What is the KMS activation tool? How to use the KMS activation tool? How to use KMS activation tool? What is the KMS activation tool? How to use the KMS activation tool? How to use KMS activation tool? Mar 18, 2024 am 11:07 AM

What is the KMS activation tool? How to use the KMS activation tool? How to use KMS activation tool?

How to use Xiaoma win7 activation tool - How to use Xiaoma win7 activation tool How to use Xiaoma win7 activation tool - How to use Xiaoma win7 activation tool Mar 04, 2024 pm 06:16 PM

How to use Xiaoma win7 activation tool - How to use Xiaoma win7 activation tool

How to merge cells using shortcut keys How to merge cells using shortcut keys Feb 26, 2024 am 10:27 AM

How to merge cells using shortcut keys

See all articles