Further discussion on "<br/>" and "\ r \ n" What is the difference between the two? _php Tips

Source: Internet
Author: User
Tags html interpreter

\ r \ n is the output of the HTML code wrapping, the customer see the effect does not wrap.
<br/> is the opposite
Effect:
I am content \ r \ n I am content
I was content <br/> I was content
==================================================
\ r means: A carriage return (acsii:13 or 0x0d), which is what we often call a hard return.
\ n says: line break (Acsii:10 or 0x0a), is what we often say soft return.

These two are not visible on the page. Right-click to view source file you can see code wrapping
==================================================
If it is output to the browser, use <br/>
If it is output to its own file, use "\ n", Windows is "\ r \ n"
==================================================
\ n, like you do a Web page in the Dreamweaver, click Enter in the source code, is to the source code line.
is the output of one (HTML markup Language), interpreted as a word-wrapping in HTML. \ n's role is to line up the source code, input, look at the HTML source code, see there will be a newline, and the HTML interpreter (browser) think it is useless things, with not all the same display.
==================================================
\ n is source code wrapping!
<br/> is the Web page performance line!!
==================================================
Attached: In-depth PHP nl2br () formatted output of the detailed

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.