HTML and CSS Reference
In-Depth Information
cols : Specifies the number of characters to display on a single horizontal line, thus defining the
width of the rendered box. Text will automatically wrap to new lines as needed or will invoke a
horizontal scroll bar (crawl bar) if a long line doesn't include word spaces to facilitate wrapping.
dirname : This attribute, new in HTML5, allows the control to automatically indicate the
directionality of its text value when the form is submitted. For example, in a document with a
default left-to-right direction, a user could enter text in a right-to-left language into a form control.
The dirname attribute can carry that additional direction information so a form handler can
process or store text of a different directionality than that of the original form. This attribute's value
is a secondary name for the control and the content direction is automatically assigned on
submission, either rtl or ltr .
disabled : A Boolean attribute that disables the control so it can't receive focus or be modified.
The value of a disabled control is not submitted. Most browsers will display disabled controls in a
“grayed-out” style by default.
form : This is new in HTML5 and allows the control to be associated with one or more additional
forms. The form attribute accepts a value of one or more form IDs, separated by spaces. This
feature allows authors to work around the lack of support for nested form elements.
maxlength : Specifies the maximum number of characters (including spaces) that can be entered
in the textarea . Browsers may not give any indication that a field has a maximum length, and
will simply stop accepting input when the limit is reached. If you include a maxlength attribute
you should also provide some visible hint to your visitors to let them know how many characters
the control will accept.
placeholder : This new attribute introduced in HTML5 allows the author to include a short text
hint to advise the user on what value is expected for the text area. The browser hides the
placeholder label automatically when the control is in focus (or when the user begins typing) and,
if there was no value entered in its place, the placeholder reappears when the field loses focus.
readonly : A Boolean attribute specifying that the control may only display a value and can't be
modified. This differs from disabled in that a read-only control can still receive focus and its
value is still submitted with the form.
required : This Boolean attribute is new to HTML5 and indicates that the control must have a
value in order to submit the form.
rows : Specifies the number of lines of text to display before scrolling vertically, thus defining the
height of the rendered box. The browser will automatically produce a vertical scroll bar when the
length of the text exceeds this given height.
wrap : Specifies how the text value should be wrapped when the form is submitted. The wrap
attribute only accepts two values: soft (the text is not wrapped at submission, but may still be
wrapped when displayed) or hard (the browser inserts returns at the textarea 's column width to
force long lines to wrap). If the wrap value is hard , the cols attribute must be defined. This
attribute is new in HTML5, and the default value is soft if the attribute is missing.
 
Search WWH ::




Custom Search