A file is basically a container that contains data. A text file is a very important and simplest kind of file. Text file is used to store data in textual format.
What is a Text File?
A text file is a file that contains data in the form of text. This is used to store and share textual data and is useful for human and software systems. A text file generally uses a simple character encoding such as UTF-8 and ASCII. text is a collection of alphanumerical characters.
A text file is non-executable. A text file can be identified by a vivid kind of extension associated with its types such as .txt, .csv, .html, .xml, .py, .log, etc. In some programming issues codes of various software are written in form text files before execution. For example, before making a web page its code needs to be created in the form of a text file of a .html extension.
A text file created by Notepad.Types of Text File
There are many types of text file as follows:
1. Plain Text File
This is a type where there is no special formatting of text such as italic, bold, heading, subheading etc. In Microsoft OS Notepad is used to create plain text file. In Microsoft OS These files are saved with the .txt extension.
2. Comma Separated File
This file remains in .csv extension. This file is used to contain tabular data. Each line represents a record, and fields within each record are separated by commas.
3. HTML File
HTML file is used to create websites and web applications. This is saved with .html extension. In this file all textual data is contained in Hyper Text Markup Language.
4. Doc and Docx file
This type of file is created by MS word in Microsoft OS. In this kind of file Text can be stored in a proper format. Heading, footer can be added. and bold, italic and various types of fonts can be used in writing.
5. Markdown File
In this type of file text is written through Markdown language. This type of file is used to create proper documentation. This file uses .md extension.
6. Programming language Source code File
Text file is also used write programming code of various languages such as python, JavaScript, C etc. This file can be saved in various extension according to the programming language such as .py for python, .js for javascript etc.
Files and Their Extension
|
plain text
| .txt
|
markdown
| .md
|
comma separated file
| .csv
|
word file
| .docx
|
HTML file
| .html
|
python code file
| .py
|
C code file
| .cpp
|
How To Open a Text File?
Opening a text file depends on OS. A file which does not contain textual content also can be open as a text file. If you are using windows, you just have to right click on the icon of text file and then select the option to open as text file.
For opening a text file in MacOS you have to right click on the icon and just have to select the text editor. By above methods you can open any file in the form of text file even those which are not contain textual data.
Converting Text File
Converting a text file means to change the file format of a text file. There can many reasons of converting of a text file. A text editor itself provides facility to save a text file in a specific format. for example, you can save a text file in various format such as HTML, XML, YML, CSV etc.
Similar Reads
What is a Temporary File? A Temporary file is a file that is produced to temporarily store information, either for interim usage by a program or for transfer to a permanent file once completed. Computer programs may generate it for several reasons, including when memory is insufficient for the tasks at hand, when working wit
4 min read
What is a Computer File? A computer system consists of devices, memory, processors, etc. Along with this, there is one of the important or core fundamental aspects which is computer files. These computer files are used to store the data in digital format. Data that is to be stored can be images, videos, audio, or text files
7 min read
What is a Notepad? Notepad is a simple text editor that comes pre-installed with Microsoft Windows Operating System. It allows you to create, edit, and store text files in .txt format such as creating notes, editing HTML codes, and much more. If a file does not contain a plain text format or contains any special forma
6 min read
What is Plaintext? Plaintext is an encryption technique, that converts an encrypted message. It refers to any readable data, including binary files, that can be seen or used without the requirement for a decryption key or device. Plain text is often used for several tasks, such as document creation, coding, and email
5 min read
Text File Formats TXT file format is a format that is developed for storing plain text with no formatting such as graphics, bolding, italicization, font style, alignment, and so on. It is one of the most basic file types and the most widely used file formats on computers. These files are smaller than other file forma
7 min read
Create Text File Using Nano Nano is a popular command-line text editor known for its simplicity and ease of use. In this comprehensive guide, we will delve into the process of creating text files using Nano, covering every aspect along with examples and detailed explanations. Creating a New Text File:To create a new text file
3 min read