views:

201

answers:

4

Hello,

Another newbie question. I just wanted to know what exactly is the difference between html and htm extensions we see for webpages. Are they same? and if so then why two extensions for the same purpose?

Thanks

+7  A: 

They are the same, but htm is used for file systems that expect 3 character file extensions. For historical reasons htm is often used on Windows systems. This follows the conventions established by the 8.3 naming restriction in the FAT file system, but there is no technical reason for a three character limit on modern file systems.

richj
+6  A: 

They're exactly the same. Originally, Unix based servers used html extensions and Microsoft IIS used htm, but now they're treated exactly the same.

chrissr
+6  A: 

They are the same.

HTM was used because some systems did not support 4-character extensions.
This is no longer true, and there is no longer any reason to use HTM.

SLaks
Surely you mean "HTM was used..."
Zano
Yes, I did. Thanks for catching that.
SLaks
+1 for and there is no longer any reason to use HTM
Sarfraz
+21  A: 

The Web was originally designed by UNIX-centric people, for whom long filenames with arbitrarily long extensions were the norm.

MS-DOS and early versions of windows were limited to 8.3 filenames, so the extension .html was not possible. Microsoft users had to use .htm instead.

Nowadays, there is no reason to use .htm. Use .html in all cases.

slim
Wait, so is it actually considered "bad" if you use .htm instead of .html? And wow, thats an interesting fact ._.
ItzWarty
Yes. Because it's rather MS-centric. Many people consider it bad taste. Amazingly, the extension ".jpeg" for JPEG files still seems to be less popular than ".jpg".
Alan
I can't believe that I'm actually reading that the UNIX centric crowd actually wants to type more letters- These are the same folks that use an OS that uses "RM" instead of "DEL" (used by every other OS at the time of creation) because RM has one less letter- see also CP, DU etc. I've never heard that it's "bad taste" to use HTM over HTML, and I'd certainly never worry about it. Next I'll hear you should use .python instead of .py
Jim B
It's not so much that "longer is better", but that the natural 4 char abbreviation for Hyper Text Markup Language is too short to further shorten, unless the technical restrictions of your environment force you to do so. A trip around a typical UNIX system will reveal lots of commands longer than 2 chars (fsck, sync, compress, mkdir, ...) and filename extensions longer than 3 chars (syslogd.conf, bash.bashrc, system.XWinrc). BTW, I always have trouble remembering 'DEL' - I tend to only reach it after trying "ERASE", "DELETE", etc. I never forget rm.
slim
so HTM is somehow ambiguous? What else can it be confused with? And yes there are certainly longer than 2 char commands, but the point is that the commands have always been as short as possible. Unix extensions have usually never been standardized (or historically long). Syslog (as an example) was created for use by sendmail- which stores it's config as sendmail.cf. My point being it's certainly not "bad taste" to use a shorter extension.
Jim B
Why not use .ht or .h then? The point is that .htm only exists because of a filesystem limitations on early Windows - not because it was a conscious decision.
Rich Bradshaw
why not .xhtml?
Chris