Add TextArea in blogger or other platforms  

Posted by Geek in

Have you ever tried to add a normal html textarea to your blogger post or any other platform , well if you have and the text is multiline (in the sense that it is on two or more separate lines) you will see annoying html break tags. Here's an example below.




How to add the text in a simple and more formatted manner by removing these break tags?

Well the solution is to use html <pre> tag that is designed to output the text in exactly the format in which it was presented to it. You also have to set the overflow property to true so that it resembles the textarea.

Here's the code on how to do it :-


<pre style="border:2px solid;overflow:auto;font-wieght:bold;height:200px;width:300px">
------Your Text Goes Here-----
</pre>


Now the above example will look like the following if you use this:



jack and jill went to the hill
blah blah blah
blah blah blah


Also you can add the <blockquote> tag just after the pre tag and before the text/code, this makes the code/text more fancy and more readable.

Hope this would be helpful

This entry was posted on Saturday, April 18, 2009 at Saturday, April 18, 2009 and is filed under . You can follow any responses to this entry through the comments feed .