Sooner or later when you are developing a web based application you will want to enable tabs in textareas so you can format some HTML or CSS. My first thought is why is this not a function of the web browser it would make sense to have a property you could set to enable tabbing. But no you need to use JavaScript. You can find plenty of solutions searching on Google. Most solutions, like the first one I found , detect when you press the tab key cancel the event and insert a tab into the textarea instead. This method is simplistic and limited when you are used to a IDE and want to indent blocks of text.