HTML File Extensions

HTML document or file extension can be either .html or .htm

Both mean the same and work the same way, and the choice is based on personal preference.

Depending on the web server configuration, one of these takes precedence over the other one.

Make sure we are consistent in using the same extension across the application.

Extensions .html Vs .htm

  • Extension .html is widely used nowadays, and we suggest using this extension.
  • Extension .html is considered to be the default HTML file extension by web browsers and servers.
  • Extension .htm is widely used in old and ancient days, in operating systems where 4 letter file extensions were not allowed like DOS.
  • If you are using the extension .htm, you may need additional server configuration to make sure the server knows about it, as it is not the default HTML file extension these days.

Overall

HTML file extension .html is widely used nowadays, and it is the default HTML file extension.