HTML Form textfields

A line textfield uses the input tag. The attribute type can have the text value or the password value. The size attribute is for the number of characters, it changes the textfield width too.

A multilines textfield uses the textarea tag. In this last case, the cols attribute defines the number of columns and the rows attributs defines the number of rows.

Usual attributes

Attribute name Attribute value
class Set a value for CSS rules. The CSS rule will be applied to all tags with the same class name
cols The number of character columns for the textarea
disabled It will disable for any usage the component
id Set a unique value, it is useful for JavaScript or for CSS rule. For CSS it will be applied only for this tag
maxlength The maximun number of characters for the input component
name The name of the parameter sent to the server
placeholder It will show an helper text inside the component. The helper text will disappear after the component gets the user focus
rows The number of rows for the textarea
size The textfield character size. It is only for input textfield usage.
value The value sent to the server when the forum is submitted. The value can also contain the default text.