htm vs html

hello everyone!

What is the technical difference between htm and html extensions?

Replies

  • sookie
    sookie
    Hi ce_neha,

    As far as web is concerned there is no difference except an extra 'L' but basically this .htm and .html matters when there is a mismatch in the filename specified in the url and as processed by server.

    Example :Consider following url which says I want .html file from the server
    #-Link-Snipped-#
    Now as you and me know .htm and .html are both same so I can use .htm also at the end right?So now try this url -same as above just changing .html at the end with .htm
    #-Link-Snipped-#
    But as server's default filename processing is such that it so not consider .htm and .html files same so it don't give desired page when I click on second modified url.

    We can change such things in server configurations I guess such that it accepts .htm and .html file as same.

    Am I sounding like an alien? Please correct me if anything wrong.

    Thanks !
  • safwan
    safwan
    As far as I know is when we make HTML file we save it as .htm and as said in above post no technical difference.

    Html
  • ce_neha
    ce_neha
    Thanks sookie,
    But i don't understand why browsers refer them as 2 different files?
    Why two extensions are provided for saving a document?
  • sookie
    sookie
    ce_neha
    Thanks sookie,
    But i don't understand why browsers refer them as 2 different files?
    Why two extensions are provided for saving a document?
    Hi ce_neha,

    I guess there is nothing to do with browser with this .htm and .html files. They just show what servers send them.so things depend on your server configuration as i mentioned earlier and regarding using two extensions for saving a file containing same code I think your query is answered well here #-Link-Snipped-#. I guess following explains what you are looking for

    When the Web started, it ran almost exclusively on What is Linux and why is it so popular? | HowStuffWorks machines and all pages were static. Html was the standard file extension. When people started using How PCs Work | HowStuffWorks running DOS or Windows as How Web Servers Work | HowStuffWorks, however, the four letters in "html" were problematic. PCs followed an 8.3 naming convention that allowed only three letters in the extension. So the world made room for two standard extensions: html and htm. It used to be that you could tell whether a Web site was running on UNIX or Windows by looking at the file extension, but now there is no distinction. HowStuffWorks runs off a UNIX server but uses "htm" as its extension -- it's the webmaster's choice.
    Addendum: Chek following two links -one ending with .html amd other ending with .htm
    #-Link-Snipped-#
    and
    #-Link-Snipped-#
    Both the above links give same output unlike the behavior of the links I mentioned in my pevious post.

    One more thing I would like to add from my side. - See if you have same piece of HTML code and you are saving it in two different files one with .htm extension and one with .html extension and when you try to open those pages in your local machine, it is obvious both will give same output but if they are loaded at any server and if the server's configuration is such that it interprets both the files differently then the scenario I explained in my previous post would happen.

    Hope your doubt is cleared now? Feel free to ask if any questions. 😀

    Thanks !
  • Munguti
    Munguti
    Okay so they are the same. i understand that.
    My question is why then do we have both of them? why not use one extension and stick to it?
  • sookie
    sookie
    Munguti
    Okay so they are the same. i understand that.
    My question is why then do we have both of them? why not use one extension and stick to it?
    hi Munguti,

    Have you looked at the link I gave in my #-Link-Snipped-#post and thing I explained there? And regarding sticking to one extension , I guess for it some standardizations would be needed.

    Thanks !
  • ce_neha
    ce_neha
    Thank you Sookie,

    Now I don't have any doubt about it.

    Thanks!

You are reading an archived discussion.

Related Posts

Hi I am not clear about the differences among time sharing, multitasking and multiprogramming operating systems,please assist!
OK, this may be many might be aware of (atleast CS?IT engineers) Reverse Polish Notation (RPN) is a mathematical notation where every operator follows all of its operands. For instance,...
Hello everybody... We have to start a radio station in my college. But we have absolutely no idea how to begin.Could any of you out there guide us as how...
How to generate the Tera HZ and provide the website...
hi........ guys. As i have to do mini project in my college, i dont have any idea of this....... so pls help me to do this,,,,,,,,,,,,,,,,,,