WeChat Public Account Development tutorial 8th-text messages using Web Hyperlinks _php Tutorial

Source: Internet
Author: User
This article focuses on the role of web hyperlinks and how to use Web hyperlinks in text messages.

The role of hyperlinks in Web pages

I would like to, but all familiar with the HTML friend, the hyperlink must not be unfamiliar. And what we're going to talk about and use today is just one of the hyperlinks---Web hyperlinks, that is, using tags in HTML to link a piece of text to another page, as an example:

Liu Feng's Blog
The above is a standard HTML code, the implementation of a Web hyperlink, will be "Liu Feng Blog" 5 words linked to the blog home page URL, when "Liu Feng blog" 5 words, will open http://blog.csdn.net/lyq8479 point to the page.

How to use a Web hyperlink in a text message

In fact, developers who do not know how to use Web hyperlinks in text messages are almost 100% familiar with HTML, especially the tags in HTML. What's so special about using hyperlinks in the text messages of public accounts? Why have so many friends ever stumbled on this issue? Let's start by looking at two ways to use hyperlinks incorrectly:

Error usage 1 (the href attribute value of a tag is not quoted):

Liu Feng's Blog
Error usage 2 (the href attribute value of a tag is enclosed in quotation marks >
Liu Feng's Blog

In web development, both of the above are possible, but in the text message of the public account, both of these are wrong, the Web hyperlink does not work, and on the Android phone will also show the HTML code as it appears, as shown in:

Effects on Android phones:

The effect on the iphone:

As you can see, the value of a tag attribute of HTML is not enclosed in quotation marks, or the use of single quotation marks is the wrong notation (on iphone, the value of a tag property href is normal with single quotes). The correct usage is to enclose the value of the A-tag href attribute in double quotation marks, as follows:

Liu Feng's Blog

Tip: When testing a public account, don't just test it on your phone, and think it's all right, because there are a couple of inconsistencies on the Android and iOS platforms on the public account.

If you find the article helpful, please leave a message or follow the public account Xiaoqrobot support Liu Feng Oh!


http://www.bkjia.com/PHPjc/444569.html www.bkjia.com true http://www.bkjia.com/PHPjc/444569.html techarticle This article focuses on the role of web hyperlinks and how to use Web hyperlinks in text messages. The role of web hyperlinks I think, but all familiar with the HTML friends, the hyperlink must not ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.