HTML extensions: .html or .htm?

Is there any significant difference between the two? Do they behave differently with other languages?

Not really. They are the same thing. The only reason why some places use .htm is that some servers don’t like 4 letter extensions.

So .htm is universally safe?

Maybe. .html is more popular. Just so long as the <!DOCTYPE HTML> is at the top I think, you’ll be fine. Take a look at this.

http://www.differencebetween.net/technology/internet/difference-between-htm-and-html/

1 Like

Oh so it depends on the servers I see. Good to know. I personally like .htm cause its short and all. But I guess I’ll change to .html before changing to it becomes a must. Thanks for the link tho. :slight_smile:

Right. Now a days, servers can take 4 letter extensions, so it doesn’t really matter to have 3 letter ones. You’ll probably never have to worry about it, unless you are dealing with some old stuff.

Yeah probably not. I saw it in a W3schools tutorial (JS coding conventions to be specific) that file extensions should be .html not .htm and that raised questions.

Basically, if you put .htm as the extension, people will think you’re an old archaic programmer.

And here I thought that I outsmarted everyone by omitting that last letter lmao. I honestly thought that .htm came as an upgrade or something. Since I started learning in the era of HTML5 with its many upgrades being applauded everywhere, I thought this was one of them (You just can’t tell).

That last comment was my general opinion. Still, it’s definitely more common to put .html.

Yeah I got you. Thanks for clearing up the confusion I had. Don’t know if I’ll be collaborating with anyone yet but I’ll be sure to use what the general public uses to be uniform (though HTML extensions will be the last thing I’ll be worried about).

The extensions are probably going to be the last thing yes. Haha.

Will need to collaborate in something soon tho. I’m just skimming through tutorials without stopping for air to build something with them.

Good luck in your endeavors!

Thank you! A happy coding to you.

1 Like