


WeChat Public Account Development Tutorial Part 8 - Using Web Page Hyperlinks in Text Messages_PHP Tutorial
This article mainly introduces the role of web hyperlinks and how to use web hyperlinks in text messages.
The role of web hyperlinks
I think anyone who is familiar with HTML will be familiar with hyperlinks. Today we are going to discuss and use only one type of hyperlink - web page hyperlink, which uses the tag in HTML to link a certain text to other web pages. The example is as follows:
<a href="http://blog.csdn.net/lyq8479">柳峰的博客</a>
How to use web hyperlinks in text messages
In fact, almost 100% of developers who don’t know how to use web hyperlinks in text messages are familiar with HTML, especially the tag in HTML. So what’s so special about using hyperlinks in text messages on WeChat public accounts? Why do so many friends have stumbled upon this issue? Let’s first look at two ways to incorrectly use hyperlinks in WeChat:
Incorrect usage 1 (the href attribute value of the a tag is not quoted):
<a href=http://blog.csdn.net/lyq8479>柳峰的博客</a>
<a href='http://blog.csdn.net/lyq8479'>柳峰的博客</a>
When doing web development, the above two ways of writing are OK, but when placed in the text message of a WeChat public account, both ways of writing are wrong. The web page hyperlink will not work, and it will not work on Android phones. The HTML code will be displayed as is, as shown below:
Effect on Android phone:
The effect on iPhone:
It can be seen that on WeChat, the value of the HTML a tag attribute is not enclosed in quotation marks, or is enclosed in single quotation marks, which is an incorrect way of writing (on the iPhone, it is normal for the value of the a tag attribute href to be enclosed in single quotation marks) . The correct usage is to enclose the value of the href attribute of the a tag in double quotes. The code is as follows:
<a href="http://blog.csdn.net/lyq8479">柳峰的博客</a>
Tip: When testing WeChat public accounts, don’t think it’s completely fine just because the test passes on your own phone, because there are currently several places on WeChat public accounts that behave inconsistently on Android and iOS platforms.
If you think the article is helpful to you, please leave a message or follow the WeChat public account xiaoqrobot to support Liu Feng!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to master Bootstrap customization and component usage includes: 1. Use CSS variables and Sass preprocessor for style customization; 2. Deeply understand and modify component structure and behavior. Through these methods, a unique user interface can be created to improve the responsiveness and user experience of the website.

H5. The main difference between mini programs and APP is: technical architecture: H5 is based on web technology, and mini programs and APP are independent applications. Experience and functions: H5 is light and easy to use, with limited functions; mini programs are lightweight and have good interactiveness; APPs are powerful and have smooth experience. Compatibility: H5 is cross-platform compatible, applets and APPs are restricted by the platform. Development cost: H5 has low development cost, medium mini programs, and highest APP. Applicable scenarios: H5 is suitable for information display, applets are suitable for lightweight applications, and APPs are suitable for complex functions.

This article provides a detailed guide to safe download of Ouyi OKX App in China. Due to restrictions on domestic app stores, users are advised to download the App through the official website of Ouyi OKX, or use the QR code provided by the official website to scan and download. During the download process, be sure to verify the official website address, check the application permissions, perform a security scan after installation, and enable two-factor verification. During use, please abide by local laws and regulations, use a safe network environment, protect account security, be vigilant against fraud, and invest rationally. This article is for reference only and does not constitute investment advice. Digital asset transactions are at your own risk.

Compatibility issues and troubleshooting methods for company security software and application. Many companies will install security software in order to ensure intranet security. However, security software sometimes...

H5 is more flexible and customizable, but requires skilled technology; mini programs are quick to get started and easy to maintain, but are limited by the WeChat framework.

Discussion on the JS resource caching issue of Enterprise WeChat. When upgrading project functions, some users often encounter situations where they fail to successfully upgrade, especially in the enterprise...

The choice of H5 and applet depends on the requirements. For applications with cross-platform, rapid development and high scalability, choose H5; for applications with native experience, rich functions and platform dependencies, choose applets.

Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...
