HTML & CSS
How can I make a new line in a textarea?
I have created these but neither work.
Can someone please help?
That works, but I need it to accept values such as <br> or \
to create the newline.
Can the field be made to except html code and proces it?
Not unless you use entities or a sever side script.
But that doesn't work make the line break with the <br>.
Textarea is literally that. The values you put in there will be shown. If you 'forget' to end the tag, the rest of your HTML document will be displayed in the textarea.
I'm not too sure why you'd want your users to type in "<br>" or "\
" but if you use a server side script you could make it so anytime they pressed enter (to create a new line) your script would interpret that as "<br>".
If you're trying to format text that already appears in a textarea then you should probably rethink what you're trying to do with it.
This topic is now closed. New replies are no longer allowed.