Log in Sign up
Back to Discover
💻

Text file

technology Maturity 11-13

A text file is a computer file.

Windows Notepad .LOG file.png
Windows Notepad .LOG file.png
It holds words in lines. You can use it to save notes. It helps you keep your ideas. It is very simple to use. Do you like to write notes?

41 words

A text file is a computer file.

Windows Notepad .LOG file.png
Windows Notepad .LOG file.png
It holds words in lines. These files are very simple. They are easy to use for saving info.
CsvDelimited001.svg
CsvDelimited001.svg
Most text files do not have bold words. They do not have slanted words either. They only have plain text. This makes them easy to read. Some files might even be empty. They can have no words at all. These are called zero-byte files. Text files are a great way to keep notes.

83 words

A text file is a type of computer file. It holds words in a sequence of lines.

Windows Notepad .LOG file.png
Windows Notepad .LOG file.png
These files are very simple. They are often used to store information. Because they are simple, they are easy to fix if data gets broken.

Most text files do not have special styles. They do not use bold or slanted words. This is called plain text.

CsvDelimited001.svg
CsvDelimited001.svg
Some files might be empty. We call these zero-byte files.

Computers use encoding to read text. Encoding is a way to turn digital bits into letters. ASCII is a common way to write English text. Unicode is a much larger set. It can represent almost all known languages. UTF-8 is a very common way to use Unicode. It works well with the older ASCII style.

Different systems handle text in different ways. Windows often uses a .txt suffix for these files. Other files use different endings to show their purpose. For example, computer code is often kept in text files. Some systems use a marker to show the end of a file. This is called an end-of-file marker. Modern systems do not need this. They can track the file size themselves.

199 words

A text file is a special kind of computer file. It holds information as a sequence of lines of electronic text.

Windows Notepad .LOG file.png
Windows Notepad .LOG file.png
You can think of it as a digital container for words. Most people use text files to store simple information. They are much easier to use than other file types. They avoid tricky problems like differences in how machines work. If a text file gets broken, it is often easy to fix.
CsvDelimited001.svg
CsvDelimited001.svg
You can often still read the rest of the file.

How a text file works depends on the computer system. Some systems, like CP/M, use a special marker to show the end of a file. This is called an end-of-file or EOF marker. Modern systems like Windows and Unix-like systems do not need this. They simply keep track of the file size in bytes. Other systems, such as OpenVMS, use record-oriented filesystems. These store text as a sequence of fixed-length or variable-length records. Most systems use a symbol to show where a new line starts. In Windows, this is a carriage return and a line feed.

History shows us how these files have changed over time. In the old classic Mac OS, a file was a text file if it had a specific label. These older files used a single character to end each line. IBM also helped shape how we see text through OEM encodings. These were used for the original IBM PC text mode displays. They included special characters for drawing lines and shapes. Today, most computers have moved toward more universal ways of reading text. This helps different machines talk to each other more easily.

There are many important facts about how text is written. Computers use encoding to turn digital data into letters. ASCII is a very common set of characters for English. Unicode is a much larger set that covers almost all human languages. UTF-8 is the most common way to use Unicode today. It is special because it works perfectly with the older ASCII style.

CsvDelimited001.svg
CsvDelimited001.svg
A file with no data at all is called a zero-byte file. On Windows, these files usually end with a .txt suffix.

You can see text files in many things you use every day. When you use a simple text editor, you are looking at plain text. This means there is no bold or slanted text to see. Some people use lightweight markup languages like markdown or wikitext. These are like an extension of plain text files. They add small notes that a computer can read. Even things like CSV files are a type of text file. They help organize data into simple rows and columns.

CsvDelimited001.svg
CsvDelimited001.svg

447 words

A text file is a specific type of computer file. It is structured as a sequence of lines of electronic text.

Windows Notepad .LOG file.png
Windows Notepad .LOG file.png
In the world of computing, files are generally divided into two categories: text files and binary files. While a binary file contains complex data, a text file acts as a simple container for human-readable characters. These files are essential for storing information because of their simplicity. They avoid many technical problems like endianness or differences in machine word sizes. Because they are so straightforward, they are also easier to recover if data corruption occurs.
CsvDelimited001.svg
CsvDelimited001.svg

How a text file is stored depends on the operating system being used. In older systems like CP/M, the computer does not track file size in bytes. Instead, it uses an end-of-file (EOF) marker. This is a special character placed as padding after the last line. Modern systems like Microsoft Windows, DOS, and Unix-like systems do not use EOF characters. They simply keep track of the exact file size in bytes. Some systems, such as OpenVMS or OS/360, use record-oriented filesystems. These store text as a sequence of fixed-length records or variable-length records. In these cases, a record-length value is kept in a record header.

Different operating systems also use different rules for starting new lines. Most systems use an end-of-line delimiter to separate text. DOS and Microsoft Windows use a two-character combination. This combination consists of a carriage return (CR) and a line feed (LF). In Unix-like systems, the standard is a single newline character known as LF. The classic Mac OS used a different method, terminating lines with only a CR character. macOS now follows the Unix format. However, macOS still recognizes older files using specific Uniform Type Identifiers (UTI). These identifiers include "public.plain-text" and "com.apple.traditional-mac-plain-text" for older files.

Encoding is the process of turning digital data into readable characters. The ASCII character set is a very common subset used for English-language files. It covers American English but lacks symbols like the euro sign or the British pound sign. To include these, a richer character set is required. Before the modern era, systems used single-byte encodings like ISO-8859 for European languages. Asian languages often required wide character encodings. Unicode was created to solve this by providing a standard for all known languages.

CsvDelimited001.svg
CsvDelimited001.svg
UTF-8 is the most common encoding for Unicode today. It is backwards-compatible with ASCII, meaning every ASCII file is also a UTF-8 file.

Microsoft Windows uses several different encoding methods for its text files. Many files use ANSI, which refers to single-byte ISO/IEC 8859 encodings. In some regions, like China or Japan, Windows uses double-byte character sets. Another method is OEM encoding, also called DOS code pages. These were defined by IBM for the original IBM PC text mode displays. They often include special characters for drawing lines and shapes. Windows also supports Unicode-encoded files using UTF-16. These files often begin with a byte order mark (BOM). This mark helps the computer understand the endianness, or the order of bytes, in the file.

File names often include a suffix to tell the computer what is inside. On Windows, a text file usually ends with the .txt extension. However, many other suffixes are used for specific purposes. For example, computer programmers keep their source code in text files. These files use suffixes that indicate the specific programming language used. Even though these files contain code, they are still considered text files. A text file can even be empty. This is known as a zero-byte file.

Windows Notepad .LOG file.png
Windows Notepad .LOG file.png

Text files can be expanded using lightweight markup languages. Examples include TeX, markdown, and wikitext. These are still considered extensions of plain text because they remain human-readable. They contain small annotations that a computer can interpret. Early versions of HTML also functioned this way, though modern HTML is mostly unreadable by humans. Other formats like CSV, which stands for comma-separated values, are also related.

CsvDelimited001.svg
CsvDelimited001.svg
These allow for organized data in rows and columns while remaining simple and easy to process.

674 words
🖼️ Images & Media (2)
File:CsvDelimited001.svg
CsvDelimited001.svg
File:Windows Notepad .LOG file.png
Windows Notepad .LOG file.png
Up Next
💻
Plain text
Technology
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.