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>
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!