


What is the role of the html base tag? Analysis of the role of the base tag (with examples)
This article mainly introduces the usage of HTML base tag, as well as the analysis of the role of HTML base tag. Next, let us read this article together
First we analyze the role of the html base tag:
The base tag is the base URL tag in the HTML language. It is a single tag located in the head tag of the web page header file. Within, a page can only use at most one base element, which is used to provide a specified default target, which can also be regarded as a mark that expresses the path and connection URL.
Common URL path forms include relative paths and absolute paths respectively. If the base tag specifies a target, the browser will use this target to parse all relative paths in the current document, including tags (a, img , link, form), that is to say, the browser will add the target given by base before the path when parsing, and the relative paths in the page will also be converted into absolute paths. When using the base tag, you should bring the href attribute and target attribute.
Let’s talk about the base href attribute:
For example, if a URL address is specified by base, then you don’t need to fill in the complete address for the file or image you want to call. , just write the file name or picture name. Use the picture below to briefly understand the usage of the base tag. Link to the HTML video tutorial on the PHP Chinese website. The full address is http://www.php.cn/course/list/11.html
<head> <base href="http://www.php.cn/course/list/11.html/ target="_blank" /> </head> <body> <a href="html视频教程">PHP中文网</a> </body>
Let’s talk about the base target attribute:
The target attribute is the way to open the web page window. If you set this attribute in the base tag, then all the links in the page will be Following this method to open a web page, you have the following options:- _blank: Open the linked page in a new window.
- _parent: Open the link in the previous window.
- _self: Open the link in the current window. This is the default value and can be omitted.
- _top: Open the link in the entire browser window, ignoring any frames.
html Analysis of the role of base tag:
This is the basic HTML language. UseThe meaning of the HTML base tag in JSP: ## The #base tag is a base link tag and is a single tag. Used to change the parameter default value for all link tags in the document. It can only be applied between the tags
and .All relative paths on your web page will be preceded by the address pointed to by the base link when linking.
jsp page can be defined: <% String basePath = request.getScheme() "://" request.getServerName() ":" request.getServerPort() path "/";%>
Add
The above is an introduction to the role of the HTML base tag (if you want to learn more HTML knowledge, come to the PHP Chinese website
HTML video tutorial). If you have any questions, you can leave a message below. . Here is also an introduction to the use of the html base tag: How to use the html base tag? Summary of usage of html base tag[Editor’s recommendation]
How to set up the html search box? Examples of how to use the input tag in the html search boxWhat are the attributes of the html input tag? Summary of usage of input tag (with examples)The above is the detailed content of What is the role of the html base tag? Analysis of the role of the base tag (with examples). For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
