How can I write a tab character in Safari?

Solution 1:

Enable the "Unicode Hex Input" input method from System Preferences > Language & Text > Input Sources and then type Option 0009.

Solution 2:

You can use control-option-tab.

In other applications you can use option-tab, but in Safari tab and option-tab are used to select elements in web views.

Solution 3:

Press Cmd-Alt-T to bring up "Special Characters..." in the Edit menu.

Search for "tab" and click Insert. You're looking for the one named "Character tabulation"

The website may not display it correctly,

but it will indent code.

Solution 4:

I usually wind up typing a tab in TextEdit or Stickies and copy-and-pasting it in Safari.