HTML extensions: .html or .htm?

HTML extensions: .html or .htm?
0

#1

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


#2

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.


#3

So .htm is universally safe?


#4

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/


#5

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:


#6

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.


#7

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.


#8

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


#9

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).


#10

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


#11

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).


#12

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


#13

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


#14

Good luck in your endeavors!


#15

Thank you! A happy coding to you.