I want to use the features and functionality that the <textarea> tag offers in browsers. I want to use it merely to hold a large block of information that can be viewed through the use of the scrollbars that come with the <textarea> tag.
So my question is can I use it without using <form></form> tags?
I want to be sure that I use it properly for contemporary and future browsers.
Thanks.
Following the standards the
textareaelement should be a descendant of aformelement.HTML5 allows to place
textareaoutside the form but have aformattribute filled.See: https://developer.mozilla.org/en-US/docs/HTML/HTML_Elements/textarea
But as I know you’ll not get any errors in major browsers using
textareaoutside the form and without theformattribute.For the purpose you’ve described in your question, you can just use a
divelement with vertical scrolling: http://jsfiddle.net/f0t0n/Ybznv/