X

Copy & paste of <h1>1</h1>\n<p>2</p> behaves differently to <h1>1</h1><p>2</p>

  • Thread starter Thread starter Xon
  • Start date Start date

Visitor Greeting

Welcome to NullWarehouse.com... We are currently seeking Mod's and Contributors. If you wish to apply for a Mod position then please click on Members dropdown arrow, then click on Staff App and fill it out completely and submit it. If you want to be a Contributor then start contributing and we will have our eye on you and take notice, something great could come of it.

  • We have redone the forum. If you notice any issues or errors please open a Support Ticket under the Members dropdown and let us know.
X

Xon

Guest

If you copy & paste from a HTML document with this sort of structure:
HTML:

Code:
<html><head></head>
<body>
<h1>1</h1>
<p>2</p>
</body></html>
It results in:
with newline said:
with newline said:

1​

2
Click to expand...
But if you copy & paste the following structure (no newline between <h1 & ><p> tags:
HTML:

Code:
<html><head></head>
<body>
<h1>header</h1><p>Lorem ipsum</p>
</body></html>
It results in:
with new line said:
with new line said:

1​


2
Click to expand...

The linebreaks typically show up when copying HTML from firefox, while chrome will strip newlines between tags.

Continue reading...
 
Similar content Most view View more
Back
Top Bottom