Open In App

Why to use .html instead of .htm extension?

Last Updated : 13 Mar, 2023
Like Article

First, we have to know, what is .html and .htm, both of which are an extension for the HTML file type. The .html stands for Hypertext markup Languages. In early 1994, there were all the extensions contained only three letters because four-letter extensions were not supported at that time. So basically when we are using an HTML file with the filename and extension .html, but the OS is not accepting the .html then .htm comes. Like DOS(Disk operating system) and Windows are accepting the .htm format. Now in this decade, all the operating systems are supported by the larger file extension so .html is acceptable and meaningful compared to .htm, because of that we use .html instead of .htm. Comparison between .html and .htm:

  1. In this era, all the Operating systems are supported by the lengthy and meaningful extension, .html is supported in this era by all the operating systems. But the .htm extension was supported by DOS in the previous days.
  2. These days main focus is on .html extensions for files or web pages. But the .htm extension files are not in focus for modern systems.
  3. All the new operating systems are supported by the .html extension but not the old operating systems like DOS. But the .htm extension is supported by both old and new.

You can use any of those file extensions. Both represent the same content type but depending on the meaningful extension we can use the .html instead of .htm. But .html is not supported by DOS which is not used these days. that is the reason we use .html not the old .htm extension. Note: If you save 2 files with the same file name with two different extensions like gfg.html and gfg.htm, then the shorter extension will get activated. We just use lengthier extensions for better understanding by humans.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads