Whats the difference between textarea and input type text in angularjs

aintnorest picture aintnorest · Feb 11, 2014 · Viewed 88.5k times · Source

Just not sure what the difference is. Trying to figure out what's best for my use case.

Answer

Atropo picture Atropo · Feb 11, 2014

The difference regards HTML and is not related to AngularJS. Anyway some definitions from the W3Schools site:

input type text:

The <input> tag specifies an input field where the user can enter data.

<input> elements are used within a <form> element to declare input controls that allow users to input data.

An input field can vary in many ways, depending on the type attribute.

Textarea:

The <textarea> tag defines a multi-line text input control.

A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier).

The size of a text area can be specified by the cols and rows attributes, or even better; through CSS' height and width properties.

You can find definitions and examples here: input and text area