<!DOCTYPE html> <html> <body> <h1>The dirname attribute</h1> <form 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> <p>When the form is being submitted, the text direction of the input field will also be submitted.</p> </body> </html>