.htm or .html extension - which one is correct and what is different?

前端 未结 10 684
广开言路
广开言路 2021-02-01 12:28

When I save a file with an .htm or .html extension, which one is correct and what is different?

相关标签:
10条回答
  • 2021-02-01 12:47

    Neither is wrong, it's a matter of preference. Traditionally, MS software uses htm by default, and *nix prefers html.

    As oded pointed out below, the .htm tradition was carried over from win 3.xx, where file extensions were limited to three characters.

    0 讨论(0)
  • 2021-02-01 12:48

    Mainly, the number of characters is different.

    ".htm" smells of Microsoft operating systems where the file system historically limited file name extensions (the part of the file name after the dot) to 3 characters.

    ".html" smells of Un*x operating systems that did not have this limitation and that were used for all the serious internet work at the time.

    Pragmatically, the two are equivalent.

    The difference is cultural. ".html" is regarded by some as more correct. The same people tend to look down at Microsoft operating systems and regard ".htm" as unsightly reminder of their limitations.

    0 讨论(0)
  • 2021-02-01 12:51

    Both are working as same,but For the technical and non technical reference please find out here, http://www.sightspecific.com/~mosh/www_faq/ext.html

    0 讨论(0)
  • 2021-02-01 12:52

    I use .htm. Less typing I guess. Or perhaps it's my windows-bias.

    0 讨论(0)
  • 2021-02-01 12:57

    Both are correct back in the past file extensions had to be a maximum of 3 characters long.

    http://en.wikipedia.org/wiki/Filename_extension

    0 讨论(0)
  • 2021-02-01 13:07

    Personally I prefer the .html but as other have said both will work.

    Just make sure you only use one. Never both on the same site! link to mypage.html is not the same as link to mypage.htm

    0 讨论(0)
提交回复
热议问题