A text file is a type of computer file structured as a sequence of lines of electronic text contained within a computer 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 and binary files, with text files structured as lines of electronic text.