Reputation: 3
as you know txt files and HTML files are text-based documents and I want to know why we use .HTML extension? I mean both of them (text and HTML files) are text-based but when I open txt file, my browser can't render it. help me, please.
Upvotes: 0
Views: 670
Reputation: 944172
The .txt
extension indicates a plain text file. HTML is text based, but it isn't plain text, it is formatted with HTML.
Software uses file extensions (or Content-Type headers if we're using HTTP) to determine how to treat a file.
Upvotes: 1