Home > Web Front-end > HTML Tutorial > Summarize the usage and jump methods of a tag in HTML

Summarize the usage and jump methods of a tag in HTML

藏色散人
Release: 2022-08-05 09:19:55
forward
6781 people have browsed it

This article will give you a summary of how to use the a tag and how to jump. I hope it will be helpful to you!

1. How to jump and use the a tag

The most important attribute of the a element is the href attribute, which indicates The target of the link. There are five ways to jump to the

a tag:
written as

<a href="http://vue.ydui.org/docs/#/flexbox" target="value"></a>
Copy after login
  • ##_blank means jumping to a new page to open, open a New window

  • _self represents the current page open link

  • _parent represents the parent set frame Open in

  • _top means open in the entire window

  • framename means open in the specified How to jump to the page when

# is opened in the frame, that is, the attribute value needs to be added to the target

2, a How the tag jumps to the specified position

name attribute is used to specify the name of the anchor. Add # in href and then add the name value of the place to be jumped so that you can jump to the specified location

<ul>
<li><a href="#C1">第一章</a></li>
<li><a href="#C2">第二章</a></li>
<li><a href="#C3">第三章</a></li>
</ul>

<h2><a name="C1">第一章</a></h2>
<p>本章讲解的内容是 ... ...</p>

<h2><a name="C2">第二章</a></h2>
<p>本章讲解的内容是 ... ...</p>

<h2><a name="C3">第三章</a></h2>
<p>本章讲解的内容是 ... ...</p>
Copy after login

3. How to make a phone call with a tag

To use the a tag to dial a phone number, just add tel and number to the href.

<a href="tel:123456789"></a>
Copy after login
Recommended: "

HTML Video Tutorial"

The above is the detailed content of Summarize the usage and jump methods of a tag in HTML. 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