Home > XHTML/CSS > .htm vs. .html

.htm vs. .html

August 2nd, 2008

I’m often asked which is better: .htm or .html. This (extremely!) short article discusses the differences between the two file types and which is the correct one to use.

So what’s the difference and which is best?

The short answer

There is none. They are exactly the same.

The long answer

Both .htm and .html are exactly the same and will work in the same way. The choice is down to personal preference, providing you’re consistent with your file naming you won’t have a problem with either.

Depending on the configuration of the web server, one of the file types will take precedence over the other. This should not be an issue since it’s unlikely that you’ll have both index.htm and index.html sitting in the same folder.

We always use the shorter .htm for our file names since file extensions are typically 3 characters long.

For more information on web development please contact us on +44(0)1202 315285 or info@acmultimedia.co.uk. Learn more about AC Multimedia.
Bookmark and Share

XHTML/CSS ,

  1. Archive
    March 25th, 2009 at 15:13 | #1

    Exactly my sentiments.

  2. Archive
    March 25th, 2009 at 15:14 | #2

    I have to say we personally prefer html because of people typing stuff in, I know it will only be a very, very small amount of people but it’s better than them seeing an error page.

    I do agree that keeping extensions to 3 characters is a good diea though.

  3. Archive
    March 25th, 2009 at 15:21 | #3

    i have to agree on that.

  4. Archive
    March 25th, 2009 at 15:21 | #4

    I agree - not a lot of difference at all apart from the default filenames scenario.

  5. Archive
    March 25th, 2009 at 15:22 | #5

    I prefer .html. It seems to be used more across the Internet than .htm does so it looks a little more professional.

    Programs like Microsoft Frontpage save files as .htm and that’s not the most respected website editor.

  6. Archive
    March 25th, 2009 at 15:22 | #6

    html is better..coz it is compatible with each…

  7. Archive
    March 25th, 2009 at 15:23 | #7

    prefer html

  8. Archive
    March 25th, 2009 at 15:24 | #8

    I prefer to rewrite extensions so the URL looks like a directory. I feel its more user friendly, and typically shorter.

    so http://www.thisisntarealsiteorlinkatall.com/about.htm would be thisisntarealsiteorlinkatall.com/about

  9. Archive
    March 25th, 2009 at 15:24 | #9

    Very intersting post and comments. Prefer html. myself.

  10. Sam
    March 30th, 2009 at 12:40 | #10

    Hello everyone,

    Could someone teach me how to upload a htm to my blog please?
    I have created a htm file and I am clueless how to upload it on blogger?

    Thank you =D

    Your assistance is greatly appreciated,
    Sam

  11. April 15th, 2009 at 09:04 | #11

    I personally prefer html and I agree that it looks more professional. Although it doesn’t make any difference at large.

  12. July 22nd, 2009 at 17:21 | #12

    I’ve been wondering about this, and I appreciate this concise and direct answer.

  1. No trackbacks yet.