Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including line breaks in HTML attributes

Tags:

html

I have an HTML textarea with a "placeholder" attribute that includes the code for a line break, &\#10;. It works fine on Chrome, but the line break is ignored on other browsers. What is causing this inconsistency, and how do I work around it?

like image 999
Isaac King Avatar asked Oct 29 '22 21:10

Isaac King


1 Answers

Include the line break naturally with the keyboard enter? Like it is shown in this image, click to see it.

If it does not work, try inserting your place holder text via javascript?
See Insert line break inside placeholder attribute of a textarea?

like image 62
nickedeye Avatar answered Nov 15 '22 12:11

nickedeye