VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-dirname-attribute/

⇱ HTML <input> dirname Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input> dirname Attribute

Last Updated : 25 May, 2026

The dirname attribute is used to submit the text direction of an input field along with the form data. It is useful for supporting languages written from right to left or left to right.

  • Sends the text direction (ltr or rtl) with the form submission.
  • Commonly used with text and search input fields.
  • Helps in handling multilingual form data correctly.

Syntax: 

<input name="myname" dirname="myname.dir">

Attribute Values:

  • name.dir It specify that the Text direction of the input field will be submitted.

Example: Illustrates the use of dirname attribute in input Element. 

Comment
Article Tags: