Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encoding a tab in html

I can encode a space using   in an HTML document. Is there an equivalent for the tab character?

I'm trying to preload a <textarea> with text that contains tabs, but my CMS removes any tab characters that exist in the HTML code.

like image 575
Senseful Avatar asked Oct 15 '10 22:10

Senseful


People also ask

What does \t do in HTML?

It is equivalent to the tab character as such. Thus, from the HTML viewpoint, there is no need to “escape” it using the character reference; but you may do so e.g. if your editing program does not let you enter the character conveniently.

What is the Unicode of tab?

The tab character (unicode U+0009) is typically converted to spaces (unicode U+0020) by the white space processing rules and then collapsed so that only one space in a row is displayed in the browser.

What is the code for TAB character in URL?

(The tab is ASCII character 9, or Unicode U+0009.)


2 Answers

After reviewing your edit, the answer is very simply: &#9; :)

like image 55
700 Software Avatar answered Sep 19 '22 11:09

700 Software


&emsp;, &ensp;, &#8195; or &#8194; can be used.

Read More at W3.org for HTML3

Read More at W3.org for HTML4

like image 44
shyammakwana.me Avatar answered Sep 17 '22 11:09

shyammakwana.me