Home > Web Front-end > HTML Tutorial > Understand the usage of a tag in html in two minutes

Understand the usage of a tag in html in two minutes

烟雨青岚
Release: 2020-07-01 13:18:53
forward
4351 people have browsed it

Understand the usage of a tag in html in two minutes

a is the HTML language tag. The a tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the a element is the href attribute, which specifies the target of the link. Let’s take a look below.

a After clicking, the label will be focused and a dotted frame will appear automatically?

Solution:

1.css processing method

a{
    outline:none;}
Copy after login

2. Add a listening event and automatically lose focus (not recommended)

<a href="#" onfocus="this.blur();"></a>
Copy after login

3. Inline processing style

<a hidefocus="true" href="#"></a>
Copy after login

tag opens link in new tab

<a target="value">
Copy after login
value Description
_blankOpen the linked document in a new window
_self DefaultOpen the linked document in the same frame
_parentOpen the linked document in the parent frameset
_topOpen the linked document in the entire window
framenameOpen the linked document in the specified frame

vueOpen a new page

 let routes = this.$router.resolve(
 	{
 		 path: &#39;/position/recruit/job/desc&#39;,
 		 query: { id: row.id }
    }
 )
 window.open(routes.href, &#39;_blank&#39;)
Copy after login

Thank you everyone for reading, I hope you will benefit a lot.

This article is reproduced from: https://blog.csdn.net/weixin_45266125/article/details/103199755

Recommended tutorial: "HTML Tutorial"

The above is the detailed content of Understand the usage of a tag in html in two minutes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template