A text file is a type of computer file structured as a sequence of lines of electronic text contained within a file system. Text files can contain plain text content but are not limited to just plain text. At a basic level, there are two kinds of computer files: text files which contain a sequence of lines of electronic text, and binary files which have another format.