Advertisement
Home Open Editor ❯

HTML <input> dirname Attribute

Example

<input type="text" id="fname" name="fname" dirname="fname.dir">

Try this code ❯

Meaning

The dirname attribute is valid for text and search input types only, the dirname attribute enables the submission of the directionality of the element.

When included, the form control will submit with two name/value pairs: the first being the name and value, the second being the value of the dirname as the name with the value of ltr or rtl being set by the browser.


Standard Syntax

HTML: <input dirname="inputname.dir">

XHTML: <input dirname="inputname.dir"/>


Advertisement

Attribute Values

Value Description
inputname.dir The text direction of the input field will be submitted.
Home Open Editor ❯
Advertisement