revision:
The dirname attribute enables the submission of the text direction of the input field/textarea. The "dirname" attribute can be used on the <input> and <textarea> elements.
The dirname attribute on an input element submits the element's text direction, left-to-right or right-to-left, together with the input value.
<element name=”myname” dirname=”myname.dir”></element>
The dirname attribute's value is always the name of the input field/textarea, followed by ".dir". It specifies that the text direction of the input field will be submitted.
When the form is being submitted, the text direction of the textarea will also be submitted.
<form style="margin-left:5vw;" action="action_page.php"> Text:<br> <textarea name="explanation"dirname="explanation.dir"></textarea> <input type="submit" value="Submit"> </form>
When the form is being submitted, the text direction of the input field will also be submitted.
<form style="margin-left:5vw;" action="/action_page.php"> <label for="fname">First name:</label> <input type="text" id="fname" name="fname" dirname="fname.dir"> <input type="submit" value="Submit"> </form>