search
HomeWeb Front-endHTML TutorialHyperlink tag description in HTML

Hyperlink tag description in HTML

May 04, 2017 am 11:01 AM
htmlHyperlink

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>

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>
For example:

XML/HTML CodeCopy content to clipboard

    <a href=
    "mailto:admin@myxzy.com">
    站长邮箱
    </a>
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>

其语法主要由以下几个部分组成
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
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
HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

HTML, CSS, and JavaScript: Essential Tools for Web DevelopersHTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesThe Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesApr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

Is HTML easy to learn for beginners?Is HTML easy to learn for beginners?Apr 07, 2025 am 12:11 AM

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

See all articles

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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.