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

Recommend several MySQL related tools

Preface: With the continuous development of Inter...

Detailed explanation of fuser command usage in Linux

describe: fuser can show which program is current...

Ubuntu 16.04 installation tutorial under VMware 12

This article shares with you the installation tut...

Two ways to remove the 30-second ad code from Youku video

I believe everyone has had this feeling: watching ...

Detailed usage of MYSQL row_number() and over() functions

Syntax format: row_number() over(partition by gro...

HTML+jQuery to implement a simple login page

Table of contents Introduction Public code (backe...

Install MySQL5.5 database in CentOS7 environment

Table of contents 1. Check whether MySQL has been...

HTML table tag tutorial (13): internal border style attributes RULES

RULES can be used to control the style of the int...

Import CSS files using judgment conditions

Solution 1: Use conditional import in HTML docume...

Detailed explanation of deploying MySQL using Docker (data persistence)

This article briefly describes how to use Docker ...

CSS3 frosted glass effect

If the frosted glass effect is done well, it can ...

How to create a simple column chart using Flex layout in css

The following is a bar chart using Flex layout: H...