In-depth discussion & quot; & amp; lt; br/& amp; gt; & quot; and & q_PHP tutorial-php Tutorial

Source: Internet
Author: User
Tags html interpreter
In-depth discussion of & amp; quot; & amp; lt; br & amp; gt; & amp; quot; and & amp; q. Rn is the line feed of the output HTML code. the effect the customer sees is not line feed. The opposite is true for the br: I am content rn, I am content br, I am content \ r \ n is the HTML code line feed output, and the effect the customer sees is not a line break.

The opposite
Effect:
I am content \ r \ n I am content
I am content
I am content
========================================================== ============
\ R: The carriage return (acⅱ: 13 or 0x0d) is what we often call a hard carriage return.
\ N indicates a line feed (acⅱ: 10 or 0x0a), which is a soft carriage return.

On the page, the two cannot see the effect. right-click to view the source file and you can see the code line feed.
========================================================== ============
If it is output to the browser, use

If it is output to your own file, use "\ n" and "\ r \ n" in windows"
========================================================== ============
\ N is like creating a webpage in DreamWeaver. press enter in the source code to wrap the source code.
Is the output (HTML markup language), which is interpreted as a line break in HTML. \ N is used to wrap the source code. after the input, you can view the HTML source code to see a line break. The HTML interpreter (browser) thinks it is useless, it is displayed in the same way.
========================================================== ============
\ N is a line feed of source code!

It is a line break on the webpage !!
========================================================== ============
Appendix: in-depth explanation of PHP nl2br () formatting output

Bytes. Br/the opposite effect: I am content \ r \ n I am content br/I am content ========================== ====...

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.