Summary of the use of all attributes of thetag in html

黄舟
Release: 2018-05-30 14:32:07
Original
9434 people have browsed it

Set the href value in thetag in HTML to the page to be jumped, and set the target value to _blank, which means that the page to pop up is displayed in a new window. If you want to set How to set the new window to a fixed size, and there are no toolbars and menu bars in the new window

The main function of this label

-Create a link to another document through the hrefattribute
-Create a bookmark within the document through the name attribute
href or name is a required attribute

target attribute

An important attribute of the A tag—target,target defines where the linked document is displayed

Possible values for target are:
_blank Open a new window
_parent Displayed in the previous window
_top Displayed in the top window

name Displayed in the window named name
_self Displayed in the current window, the default attributes
_parent, _top, name must be used in combination with frame.

If the frame or window with the specified name or id does not exist, the browser will open a new window, give the window a specified tag, and then load the new document into that window. From now on, theHyperlinkdocument can point to this new window.

  

Table of Contents

Copy after login

href attribute

# #href specifies the link address:

-Text link

百度一下
Copy after login

-

imageLink:

Copy after login

Three possible values for href:

## - Absolute URL - points to another site

href="http://www.example.com/index.htm"
Copy after login

- Relative URL - points to a file within the site

href="index.htm"
Copy after login

- Anchor URL - points to an anchor in the page

href="#top"
Copy after login

name规定了锚的名称

相对链接

跳到第一章 ... 

第一章

本章的内容有....

Copy after login

绝对链接

其他

download 规定被下载的目标,即点击后直接下载某个目标 (H5)

media 规定目标文档是专为什么样的平台设计的,没有实际作用 (H5)

type 规定了文档的mime类型,比如”text/css”
X/charset 规定链接的
字符集(w3shool标记为所有浏览器不支持)
X/hreflang 规定链接文档的语言(w3shool标记为所有浏览器不支持)

The above is the detailed content of Summary of the use of all attributes of thetag in html. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!