Possible Duplicate:
What is the difference between \r and \n?
I really would like to know what’s the difference between \n , \r , \t , chr(13) , how they are used in a web application, in which OS, and so on.
For example, can you confirm that windows uses \n\r for the newline, while of linux uses just \n right? It would be interesting to know these things.
Thanks
\n – Line Feed – 0x0A – 10 decimal – LF
\r – Carriage Return – 0X0D – 13 decimal – CR
\t – tab – 0x09 – 9 decimal – ht (horizontal tab)
For detailed hex, decimal values refer:
http://web.cs.mun.ca/~michael/c/ascii-table.html
CR+LF: DEC TOPS-10, RT-11 and most other early non-Unix and non-IBM OSes, CP/M, MP/M, DOS (MS-DOS, PC-DOS, etc.), Atari TOS, OS/2, Microsoft Windows, Symbian OS, Palm OS
LF+CR: Acorn BBC spooled text output.
CR: Commodore 8-bit machines, Acorn BBC, TRS-80, Apple II family, Mac OS up to version 9 and OS-9
LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others. However, in tty ‘raw mode’, CR+LF is used for output and CR is used for input.
RS: QNX pre-POSIX implementation.
For more details on \n, \r \t refer:
http://en.wikipedia.org/wiki/Newline
http://en.wikipedia.org/wiki/Carriage_return
http://en.wikipedia.org/wiki/Horizontal_tab
To use \n \r \t in html for you can use the below codes: