Home Web Front-end HTML Tutorial Hyperlink tag description in HTML

Hyperlink tag description in HTML

May 04, 2017 am 11:01 AM
html Hyperlink

This article mainly introduces the tutorial on how to use the hyperlink tag in HTML, including how to use email links. Friends in need can refer to the various

HTML of the

website Documents are connected to each other through hyperlinks to form a coherent website. Users can jump to the page they want to browse by clicking on the hyperlink. Therefore, hyperlinks can be seen in any website and are the core component of connecting websites to form a whole.

Arrangement of anchor point
HTML hyperlinks are triggered with the tag as the anchor point. The anchor point needs to have a carrier, and this carrier It can be a text, a word, a sentence, an image or a shape. When the mouse moves to a carrier with an anchor point, the mouse will turn into a small hand, indicating that the user can click. After the user clicks on the anchor point, it will jump to the address corresponding to the href in the tag. .

Usage of jump attribute
In
HTML link, you can use the href attribute to create a link to another document, usually used for page jumps. This is very common and will not be explained again.
Use the name attribute to create a bookmark inside the document so that a hyperlink can jump to a certain part of the page within the document. For example: set to place it in the middle of the page. Then set the jump to the middle of the page anchor point at the head of the page. When the user clicks this anchor point at the head of the page, the page will scroll and jump to the name bookmark. The location is in the middle of the page.

HTML link syntax
HTML link code is very simple to use. For example:

XML/HTML CodeCopy content to clipboard

  1. <a href=”url”>
    锚文本链接
    </a>
    Copy after login

The href attribute is used to set the jump target. The text between the start tag and the end tag is displayed as a hyperlink.

The target attribute of HTML link
The target attribute can set the opening method of the page after clicking on the anchor text. There are 4 reserved target names used for special document redirection operations:
_blank
The browser always loads the target document in a newly opened, unnamed window.
_self
The value of this target is the default target for all tags that do not specify a target, which causes the target document to be loaded and displayed in the same frame or window as the source document . This target is redundant and unnecessary unless used in conjunction with the target attribute in the tag of the document title.
_parent
This target causes the document to be loaded into the parent window or frameset containing the frame that is referenced by the hyperlink . If this reference is in a window or in a top-level frame, it is equivalent to target _self. _top
This goal causes the document to load into the window containing the hyperlink. Using the _top goal will clear all contained frames and load the document into the entire browser window. Generally used to click the anchor point in the
iframe frame. The target link is opened directly on the current page instead of loading in the iframe.

HTML link triggers desktop software to send emails
Add an address starting with mailto: in the href attribute, and combine it with the target email address to directly call the default in the user's computer Email management software that automatically fills in content and sends emails.
There are many websites where you can directly click on the email address and the interface for sending emails will pop up.
The email hyperlink code is as follows:

XML/HTML CodeCopy the content to the clipboard

    <a href=
    "mailto:email地址">
    EMAIL
    </a>
    Copy after login
For example:

XML/HTML CodeCopy content to clipboard

    <a href=
    "mailto:admin@myxzy.com">
    站长邮箱
    </a>
    Copy after login
Note: Since the address is published directly, there may be a lot of spam. It is recommended not to use this email hyperlink.

This admin@myxzy.com mailbox receives spam every day because I wrote the address here.
Even if you want to indicate the email address without making a hyperlink, do not write it directly on the website or web page with text. You can use pictures or other methods to represent the address
Complex links:

XML/HTML CodeCopy content to clipboard

  1. <a href=
    "Mailto:ghsau@163.com?CC=ghsau@163.com&BCC=ghsau@163.com&Subject=Hello&Body=你好">
    给我发邮件
    </a>
    Copy after login

其语法主要由以下几个部分组成
mailto: (发送邮件到) 后面跟随邮箱地址,例如:my@frontopen.com
? (分隔符)用于在地址后面跟随相应的参数
&;  (参数连接符)同时设置多个参数时,需要用&符号进行区分连接
cc= 、 bcc=(抄送),后面跟随需要抄送人的邮箱地址,例如:my@frontopen.com
subject=  (邮件主题)后面跟随你的邮件主题
body= (邮件内容)后面跟随需要的邮件内容

The above is the detailed content of Hyperlink tag description in HTML. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles