HTML stands for Hyper Text Markup Language and HTM – Hyper Text Markup. There is not a big Difference between htm and html, when you developing a website both will work same. In this tutorail you will know what is deffrence between HTM vs HTML and how to save with this extension example.
Difference between HTM and HTML
There is actually no difference between .htm and .html file, except only the number of characters used in extensive.
You can save the page as a HTML or HTM, both will work same.
The reason for the difference between HTML HTM file extension is character length. In old days, when there are DOS systems only used.
HTM extension webpage is used in the old operating system, like in window and DOS had a restriction on file name length. But Nowadays Windows support HTML extension without any problem.
Where Macintosh (Apple Operating system – mac os) was not limited to three-letter file extensions, so Mac users used ‘.html’.
That’s only difference we found, below is same detail in tabular way to easy understand.
|Points||HTML File||HTM File|
|Extension||.html is being used as extension.||.htm is being used as an extension.|
|Use||HTML extension is widely and mostly places used in nowadays.||HTM extension was widely used in old and |
|Acceptance||Nowadays, use the HTML extension for files or web pages.||HTM extension files are not in focus for latest systems.|
|Letters||HTML is 4 letters extension.||HTM is 3|
|Operating System||Support all new operating system. Old system less chance to work.||It can use on old operating system like DOS as well as in new operating systems also.|
How to Save page as HTML vs HTM?
Saving web page with html htm file extension is the same for both. Just you need to give a name.
See the below snapshot of the example used both type of file with the same code but different extension and output.
<h1>My First Heading</h1>
<p>My first paragraph.</p>
I opened the both HTM and HTML file extension file in the browser. Both are working the same and without problem.
What makes a good filename for a web page?
Giving a good filename to a web page is important, here is some point you should consider when writing a web page name.
- Don’t use a special character – ( #, @, $ etc), use the letters a-z, A-Z, the numbers 0-9, hyphens (-), underscores (_) and periods (.).
- No space– Some operating support space and some are not.
- Start with Letter – Suggest to start webpage name with a letter. But if required to use number, then you can do it.
- Filename Length – Don’t use a long file name, around 30 to 50 characters is good enough.
- File Extension – Don’t forget give file extension “.htm” or “.html”. There is more webpage file extension like “.php”, “.asp” etc. Right now its a basic of HTML web design so we are not covering a depth of everything.
Do comment if you have any doubt and suggestion.
Note: The htm vs html code example is tested on Safari browser (Version 12.0.2).
OS : macOS 10.14 Mojave