How can I write a tab character in a text field shown by safari in an HTML page?
I tried using the tab key with the modifier keys, but I didn't get Safari to write a tab character.

Is it possible to do it? If it is possible, how can I do it?


3 Answers 3


You can just press ControlOptionTab to insert a tab in the text field you're currently editing.


If the text field you're working with doesn't have any JavaScript features to assist with the formatting of text (eg. the search box or the comment box here on Super User) you can type Control-Q and then Control-I. However, extra whitespace is ignored unless you're using <pre> or <code> tags.

There is a similar question here on Super User (Typing the tab character in browser text boxes) that addresses another way to do this with Firefox.


Easy/dumb fix:

  1. Open a text editor
  2. Press TAB
  3. Select and copy the tab character
  4. Paste into text field

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .