differences between html and htm

This is probably a really dumb question but what is the difference between htm and html code extensions?

I seem to have both and it is causing broken links.

thanks in advance,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

They're the same.
htm was created when 8.3 filenames (8 character filename, 3 character extension) were still very common, html had 4 letters and needed to be shortened. Now it's just a matter of preference.
The reason it can be either is this:
Windows used to only allow 4 character extensions, while a few others allowed 4 character extensions to make it easier for the user.  So on windows, it was .htm (3 char limit) and on others it was .html (to make it easy).  Now to make it not have to be a hassle to have 2 file names for every static page you create, you can now use either.
You also need to take the server into consideration.  Only for the default document though.  If a server is set to use index.html as the default it will not use index.htm unless that is also in the list of defaults.  The different suffixes make for different files.  You can have both mypage.htm and mypage.html with completely different content.  They are different files.

Pretty much all computers these days are not limited to the old DOS style of 8.3 names so it really does just leave it to preference.  With that said, even if a computer does have that limit it will still show 8.4 named web pages because that is up to the server hosting the page and not the computer browsing it.
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

cachedVB meant to say "used to only allow 3 character"

But the other posters have it basically correct.  On a modern computer, there is no difference.  Historically, in certain operating systems could only have file names with 8 letters and 3 more in the extension, or "8.3"  Here's a good article about that: http://en.wikipedia.org/wiki/8.3  It goes into a lot of the weird things that happened when Microsoft worked around that limitation.
One thing to account for is that the XHTML spec has .html as the standard extension name.  so if you are interested in being standards compliant, use html.

if you don't care, then use htm.   But I would recommend using .html as it's good practice to get into a standards habit. No one ever fired somebody for using IBM... er  html.
dprice7Author Commented:

thanks for the overwelming response from everybody!

I guess I should  have phrased my question a little differently.

What I was actually trying to understand was how I ended up with two sets of filenames when I was creating my site?

Didn't know if maybe Dreamweaver was creating with different extensions or what made the htm vs html files.

I wonder if they will let me give everybody 50 points on this one?

thanks ,
To give everyone above 50 points you will have to increase yours points to 250 then select split points and then you can give each 50 :)


You probably won't want to increase to 250 though, thats 200 more points.  I recommend just picking 1 and give that person 50, or 2 and give each 25.
In my case Dreamweaver always creates .htm documents, and not .html files. I guess you yourself have saved some files with .html extension.
Something far: in default IIS settings, the home page should have one of these names: index.htm, Default.asp, or Default.htm
so I prefer to work with .htm!
PS:Seems that all people hear are hungry for points! ;o) If it helps, you can ignore me and give them the points, as you would before I posted here. (I'm joking, but don't really bother if you really do so. I just meant to comment out.)
What is the difference between the HTM and HTML extensions?
Short Answer
Other then the obvious, the letter "L," there's not much of a difference between the two extensions. Most, if not all, web browsers and servers will treat a file with an HTM extension exactly as it would a file with an HTML extension, and vice versa.

Long Answer
Practical Differences
Practically speaking, there is no difference between the two extensions. Both denote that the file contains HTML. This is really a matter of convention and is not an absolute, but most realize that a file whose extension is htm or html contains HTML.

On most, if not all, servers either file will be sent with a MIME type of text/html by default. This can usually be changed by the server's administrator(s), but is, more often then not, left alone.

On most, if not all, browsers, either file will be displayed as intended (i.e. rendered according to the browser's default manner of displaying HTML documents). This last is due more to the MIME type sent by the server then by the file's extension, but that's a matter for another FAQ.

Generally, the use of htm over html, or vice versa, is left to the author's personal preferences.

Technical Differences
Technically speaking there are few to no important differences. An obvious difference is the addition of the letter "L" in the html extension. The technical difference that the additional letter will make to the operating system is better left to a different discussion but in the context of a web author, the additional "L" will make no difference.

The technical difference that the additional letter will make to an http server (a "web server") is minimal. Usually, a server will use a file's extension to figure out what MIME type to send back to the requesting client. Most servers are configured by default to send back the text/html type when the requested file ends in an htm or html extension. This can be changed by the server's administrator(s) in such a way that one of the above extensions returns a different MIME type then the other, however, this is not a very common practice.

It is a common misconception that a file ending in an htm extension had to have been created on a DOS/Windows 3.x platform. This is because those operating environments limit filenames to a 3 letter extension. However, it is very simple to create a file with a 3 letter extension on most other platforms, as well. Even those that allow longer file extensions.

Default Filenames
The one situation in which there may be a difference between the two extensions is that of a server's default filenames. When a URL that does not specify a filename is requested from a server, such as http://www.domain.dom/dirname/, the server returns a file from the requested URL that matches a default filename. Examples of common default filenames include "index.html," "index.htm," "welcome.html," "welcome.htm," "default.html," "default.htm," etc. However, an administrator can make the server's default filename anything he/she so desires.

In the case of a default file, the author's filename must be exactly the same as the server's default filename. In other words, if your server is configured to use "index.html" as the default filename, your file must be named "index.html" and not "index.htm."

Note that servers are often configured with more then one default filename. Check with your server administrator or ISP for details about your specific server.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
king_villy has provided you with a long detailed explanation of what we said above. I think the question is answered. Aren't you going to close this quesiton by selecting one or more answers?
Wish I can help

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.