Plain text, rich text and HTML documents all contain text-based data, but each has significant differences in use. Plain text documents -- TXT files -- are exactly what they sound like: files containing nothing but text. Rich text documents, saved as RTF files, expand on plain text with compatibility for format and style options. HTML documents, which are used to create websites, also support these options through the use of coded tags.
Plain Text and Rich Text
Plain text files can store only text, including numbers, symbols and line breaks. TXT files can’t save formatting options, such as fonts, colors or text sizes, and if you convert another type of document to plain text, it loses these settings. Some plain text editors, such as Notepad, provide font and size settings, but these settings only change how the entire file looks on your screen, rather than actually formatting selections of text. Conversely, rich text files, produced in programs such as WordPad, do store these types of formatting selections, just as a Word document would.
Text Versus HTML
Like rich text, HTML can contain formatting for text layout and style, but these format choices do not take effect directly in the text editor. Instead, a Web browser reads the HTML formatting tags in a website’s code and displays the site’s content accordingly. When viewed in a text editor, HTML appears as plain text -- the text content of the site -- interspersed with codes contained in angle brackets. Alongside HTML, many Web designers use CSS, a complementary language that helps style Web pages uniformly with less repeated coding.