Introduction to HTML method of opening link files using hyperlinks

Introduction to HTML method of opening link files using hyperlinks

a and href attributes HTML uses <a> to represent hyperlinks, which are called anchors in English.
<a> can point to any file source: an HTML page, a picture, a video file, etc. Usage is as follows:
<ahref="url">Link display text</a> Click the content in <a></a> to open a link file, and the href attribute indicates the path of the link file.
For example, if you link to the homepage of jb51.net, you can express it like this:
<ahref="https://www.jb51.net">Dotte Software Station jb51.net Home Page</a>target attribute Using the target attribute, you can open the link file in a new window.
<ahref="https://www.jb51.net"target=_blank>Dotte Software Station jb51.net Home Page</a>
title attribute Using the title attribute, you can display the text annotation of the hyperlink when the mouse hovers over the hyperlink.
<ahref="https://www.jb51.net"title="Dotte Software Station Web Tutorial and Code Chinese Site">Dotte Software Station Website</a>If you want the comment to display on multiple lines, you can use as a line break.
<ahref="https://www.jb51.net"title="Dotte Software Station Web Tutorial and Code Chinese Site">Dotte Software Station Website</a>
name attribute Using the name attribute, you can jump to a specified part of a file.
To use the name attribute, set a pair. One is to set the name of the name, and the other is to set an href pointing to the name:
<ahref="#C1">See Chapter 1</a><aname="C1">Chapter 1</a>
The name attribute is often used to create a table of contents for a large document. A link is created for each chapter and placed at the beginning of the file, and the Name attribute is set at the beginning of each chapter. When a user clicks on a link to a chapter, the content of that chapter is displayed at the top.
If the browser cannot find the part specified by Name, it will display the beginning of the article without reporting an error.
Link to email address On the website, you will often see a "Contact Us" link. Once you click this link, it will trigger your email client, such as Outlook Express, and then display a new email window. This function can be achieved using <a>.
<ahref="mailto:[email protected]">Contact Sina</a>

<<:  5 solutions to CSS box collapse

>>:  jenkins+gitlab+nginx deployment of front-end application

Recommend

Understanding and using React useEffect

Table of contents Avoid repetitive rendering loop...

Write a React-like framework from scratch

Recently I saw the article Build your own React o...

Summary of the application of transition components in Vue projects

​Transtion in vue is an animation transition enca...

Summary of problems encountered when installing docker on win10 home version

Docker download address: http://get.daocloud.io/#...

MySQL PXC builds a new node with only IST transmission (recommended)

Demand scenario: The existing PXC environment has...

mysql group_concat method example to write group fields into one row

This article uses an example to describe how to u...

Detailed explanation of the construction and use of Docker private warehouse

The image can be saved on hub.docker.com, but the...

Detailed explanation of the usage of 5 different values ​​of CSS position

The position property The position property speci...

Detailed explanation of Linux command file overwrite and file append

1. The difference between the command > and &g...

The difference between the four file extensions .html, .htm, .shtml and .shtm

Many friends who have just started to make web pag...

Several methods to execute sql files under mysql command line

Table of contents The first method: When the MySQ...