File Extension File Extension Guide

What is an HTM File?

A technical reference for the .htm extension, a web page written in HTML. What an HTM file is, why it means exactly the same thing as a .html file, how to open one, and how to view or convert it.

Web Page 🌐 Opens in a Browser 📄 Same as .html 📝 Plain Text
.HTM

HTML Web Page File

Type:Web page
Extension:.htm
Language:HTML
Same As:.html
Opens In:Any web browser

📖 What is an HTM File?

An HTM file is a web page. The .htm extension marks a document written in HTML, the language behind almost every page on the web, and a browser reads that document to display the text, images and links you see on screen.

Here is the part that surprises people. An .htm file and a .html file are the very same thing. Both hold HyperText Markup Language, both open in any browser, and both behave identically. The only difference is that one extension has three letters and the other has four. So if you have run into a .htm file and wondered how it differs from the .html pages you know, the short answer is that it does not.

Because it is an ordinary web page, an HTM file shows its content straight away in a browser, without needing a server to process it first. That makes it one of the simpler file types to deal with once you know that the odd-looking extension is just a shorter spelling of the familiar one.

Key Characteristics

  • A web page written in HTML
  • Identical to a .html file in every way
  • Opens in any browser on any device
  • Plain text you can read and edit

Good to Know

  • The three-letter form is a leftover from older systems
  • .html is the modern standard spelling
  • Renders on its own, with no server needed
  • Can be converted to PDF and other formats
💡 Why it matters: An HTM file is simply a web page whose extension was trimmed to three letters. Recognising that it equals a .html file tells you everything about how to open it, view it and work with it.

⚡ Quick Facts

File Extension.htm
Full MeaningA web page written in HTML
LanguageHyperText Markup Language
Equivalent To.html, with no difference at all
Opens InAny web browser
Origin of the Short FormThe 8.3 filename limit of MS-DOS
Media Typetext/html
File TypePlain text

⚖️ HTM vs HTML

By far the most common question about this file type is how .htm differs from .html. The reassuring answer is that, in practice, they do not differ at all.

Both extensions name a file containing the same HyperText Markup Language. A browser given either one reads the code inside and paints the same page, and a web server hands either one to a visitor in the same way. You can take a file called page.htm, rename it to page.html, and it will keep working exactly as before, because nothing inside the file changes. The choice between them is a matter of habit and history rather than capability. These days .html is treated as the standard, since it spells out the language in full and modern systems have no trouble with the longer name, while .htm lingers mostly in older sites and tools.

Trait.htm.html
Language insideHTMLHTML
How a browser reads it The same The same
Extension lengthThree lettersFour letters
Seen more onOlder sites and toolsModern sites, the standard
Can rename to the other Yes, with no change to the content
💡 The bottom line: There is no functional difference between .htm and .html. Same language, same browser behaviour, freely interchangeable. Only the length of the extension sets them apart.
.htm and .html are the same file page.htm HyperText Markup Language page.html HyperText Markup Language = Same page in any browser .htm is only shorter because old systems capped extensions at three letters

🕰️ Why Two Extensions Exist

If the two are the same, it is fair to ask why there are two at all. The reason is a rule from the early days of personal computing that has left its mark on file naming ever since.

HTML itself was created by Tim Berners-Lee around the start of the 1990s, and in those years systems like MS-DOS and early Windows followed what was called the 8.3 filename rule, which allowed a name of up to eight characters followed by an extension of no more than three. HyperText Markup Language naturally shortens to html, four letters, which broke that three-letter limit. To fit, the extension was trimmed to htm, and the shortened form spread across a generation of files, tools and web servers. When operating systems later dropped the restriction and allowed longer extensions, .html became the fuller, preferred spelling, but the older .htm never disappeared. It survives today in legacy websites, in files produced by older software and wherever consistency with an existing setup matters more than following the newer convention.

💡 A three-letter leftover: The .htm form exists only because early systems capped extensions at three characters. The limit is long gone, but the shorter spelling stuck around for backward compatibility.

🗂️ What an HTM File Holds

An HTM file is plain text, and what fills it is HTML markup, the set of tags that describe a page. Those tags tell the browser what each piece of content is and how it fits together.

Tags

Markup Tags

Angle-bracket tags like headings and paragraphs that give the page its structure.

Content

Text and Links

The words on the page and the hyperlinks that carry you to other pages.

References

References to Media

Pointers to images, styles and scripts that the browser fetches to finish the page.

The markup itself does not contain pictures or styling. Instead it points to them, so an image on the page is really a tag naming a separate image file that the browser loads alongside the HTM file. This is worth remembering when you move a page around, since the references need to keep pointing at the right places for everything to appear.

🔬 Inside the Code

Opening an HTM file in a text editor reveals ordinary HTML. A short example shows the shape of it.

A minimal HTM page

<!doctype html>
<html>
  <head><title>My Page</title></head>
  <body>
    <h1>Hello</h1>
    <p>A link to <a href="page2.htm">page two</a></p>
  </body>
</html>

<!-- a browser reads these tags and draws the page -->

The tags in angle brackets mark up the content, so the heading tag makes a title stand out and the anchor tag creates a clickable link. Notice that the link here points to another .htm file, which is common in older sites that used the short extension throughout. A browser reads all of this top to bottom and renders a finished page, which is exactly what you see when you open the file normally.

📂 How to Open an HTM File

Opening an HTM file is refreshingly simple, because the tool for the job is already on almost every device. A web browser is all you need to see the finished page.

1

Any web browser

Double-click the file and it opens in Chrome, Firefox, Safari or Edge, showing the rendered page.

2

The Univik File Viewer

Open it in the File Viewer to preview the page in your browser with nothing to install.

3

A text editor

To see the HTML behind the page, open it in Notepad or a code editor instead of a browser.

For most people, double-clicking to view the page in a browser is all that is wanted, and it works the same whether the extension is .htm or .html. If instead you need to see or change the markup, open the file in a text editor, which shows the raw tags rather than the finished page. The two ways of opening it answer two different needs, viewing the page and reading its code.

💡 No special software needed: Any browser already on your computer or phone will open an HTM file and show the page. You only need something else when you want to edit the underlying HTML.

✏️ Viewing and Editing

There are two useful views of an HTM file, and knowing which you want saves confusion. One is the page as a visitor sees it, and the other is the markup underneath.

To read the code, open the file in a plain text editor or, better, a code editor that colours the tags and makes the structure easy to follow. Within a browser you can also choose to view the page source, which shows the same markup without changing anything. Editing is then a matter of changing the tags and text and saving the file, after which reloading it in a browser shows the result. Because the file is just text, no special program is required to make changes, though a code editor makes the work far more comfortable than a bare text box.

💡 Two views of one file: A browser shows the finished page, while a text editor shows the HTML tags that build it. The same .htm file serves both, depending on how you open it.

🔄 Converting an HTM File

Sometimes you want a web page in a different shape, such as a document you can print or share without a browser. Because an HTM file is a real, viewable page, it converts cleanly into other formats.

The most common need is a PDF, which turns the page into a fixed document that looks the same everywhere and prints tidily. A quick way is to open the page in a browser and print it to PDF, and for a more reliable result the File Converter can turn an HTM file into PDF or other formats without the quirks of browser printing. You can also convert a page into a word processor document when you want to keep editing its text elsewhere. In each case the converter works from the finished page, so images and links referenced by the file are pulled in as part of the result.

💡 A page becomes a document: Converting an HTM file to PDF captures the page as a fixed, shareable document. It is the usual choice when you want a copy that reads the same for everyone and prints neatly.

🔁 Renaming Between Extensions

Since .htm and .html are the same, you can rename a file from one to the other whenever it suits you. The content is untouched by the change, so the page keeps working.

On your own computer this is as easy as editing the filename, and the browser will still open it. The care comes when a page is already live on a website. Visitors and search engines may have saved links to the old address, and simply renaming the file can leave those links pointing at a page that no longer exists. This matters for search too, because although the file format is identical, a search engine treats page.htm and page.html as two different web addresses rather than one, so a bare rename can look like a page vanished and a new one appeared, splitting or losing the ranking. The safe way is to set up a redirect, ideally a permanent 301 redirect, from the old name to the new one, which sends anyone using the old link to the right place and passes the standing the page has built up on to the new address. For a private file with no links pointing at it, none of that applies and a plain rename is fine.

⚠️ Renaming a live page needs a redirect: Changing .htm to .html on a published page can break saved links and search results. Add a redirect from the old address to the new one so nothing is lost.

🏠 index.htm vs index.html

On a website, the file named index is special. When a visitor goes to a folder without naming a page, the web server looks for a default document to show, and that is usually a file called index. This is where the two extensions can quietly collide.

A web server keeps an ordered list of default filenames and serves the first one it finds. On most servers index.html sits ahead of index.htm in that list, so if a folder happens to contain both index.html and index.htm, the server shows index.html and never reaches the other. Older Microsoft setups sometimes use default.htm for the same role. The practical lesson is to keep a single index file per folder rather than one of each, since two files with the same name and different extensions can leave you editing one while the server serves the other. If you inherit a site that already uses index.htm throughout, there is no need to change it, because the server is perfectly happy to serve the shorter name when it is the one present.

💡 Do not keep both: If a folder holds index.html and index.htm together, the server usually serves index.html and ignores index.htm. Keep one index file per folder so you are never editing the page nobody sees.
A folder request: the server serves the first index it finds visitor opens a folder URL 1. index.html 2. index.htm 3. default.htm serves the first match index.html wins if both exist Keep one index file per folder, or you may edit the page nobody sees

🛠️ Common Issues

HTM files rarely cause trouble, but a few small things come up. Each has a straightforward explanation.

The code shows instead of the pageThe file opened in a text editor. Open it in a browser to see the rendered page.
Images are missingThe page points to image files that were not moved with it. Keep the referenced files alongside it.
A link goes nowhereThe linked file was renamed or moved. Check that the address in the link still matches a real file.
Wondering if it differs from .htmlIt does not. The two extensions name the same kind of file and behave identically.
Confused with a .mht fileA .mht or .mhtml file is a web archive bundling the page and its images in one file, which is different from a plain .htm.

❓ Frequently Asked Questions

An HTM file is a web page written in HTML, the HyperText Markup Language behind almost every page on the web. A browser reads the tags inside the file and displays the text, images and links as a finished page. Importantly, an .htm file is exactly the same as a .html file, since both hold the same kind of code and open the same way. The only difference is that .htm uses a three-letter extension while .html uses four. So if you meet a .htm file, you are simply looking at an ordinary web page saved with the shorter spelling.

No, there is no functional difference at all. Both extensions name a file containing HTML, both open in any web browser, and both are served by web servers in the same way. A file works identically whether it is called page.htm or page.html, and you can rename one to the other without changing anything inside. The choice is a matter of history and habit rather than capability. Today .html is treated as the standard because it spells out the language in full, while .htm survives mostly in older sites and tools.

The two extensions exist because of an old filename rule. Early systems like MS-DOS and the first versions of Windows followed the 8.3 convention, which allowed a name of up to eight characters and an extension of at most three. HyperText Markup Language shortens to html, which is four letters and broke that limit, so it was trimmed to htm to fit. The shortened form spread widely. When later systems removed the three-character cap, .html became the fuller preferred spelling, but .htm stuck around for backward compatibility and is still seen today.

The easiest way to open an HTM file is to double-click it, which opens it in your web browser and shows the finished page. Any browser works, including Chrome, Firefox, Safari and Edge, and this is the same whether the file is .htm or .html. If instead you want to see or change the HTML behind the page, open the file in a text editor or a code editor, which shows the raw tags rather than the rendered page. So a browser is for viewing the page and a text editor is for reading its code.

Yes. Because an HTM file is a real web page, it converts cleanly into a PDF, which is handy when you want a fixed document to print or share. One quick way is to open the page in a browser and use its print option to save as PDF. For a more consistent result, a dedicated converter can turn the HTM file into a PDF or other formats without the quirks that browser printing sometimes introduces. The converter works from the finished page, so images and links referenced by the file are included in the result.

Yes, you can rename a .htm file to .html, or the other way around, and the content is untouched, so the page keeps working. On your own computer this is as simple as editing the filename. The one place to take care is a page that is already live on a website, because visitors and search engines may hold links to the old address, and a plain rename can leave those links broken. The safe approach there is to add a redirect from the old name to the new one, which preserves existing links and search standing.

No special software is needed to view an HTM file, because a web browser is already on virtually every computer and phone, and that is all it takes to see the page. You would only reach for something else when you want to edit the HTML behind the page, in which case a text editor or a code editor lets you change the tags. There is nothing to buy or install just to open one. This ease is one reason web pages are among the more approachable file types to handle.

Either works, because a web server can serve a folder's default page from either name. The thing to avoid is keeping both in the same folder, since the server checks an ordered list of default filenames and usually lists index.html ahead of index.htm, so it would serve index.html and ignore index.htm. That can leave you editing a file the server never shows. Pick one name and use it consistently. If your site already uses index.htm throughout, there is no need to switch, as the server will happily serve it when it is the one present.

The extension itself does not make a page rank better or worse, so a site built on .htm is not at a disadvantage against one built on .html. What matters is consistency. Because a search engine treats page.htm and page.html as two separate web addresses, switching a live page from one to the other without a redirect can look like the old page disappeared and a new one appeared, which risks losing the ranking the page had. If you do change extensions, add a permanent 301 redirect from the old address to the new one so the standing carries over.

On a phone an HTM file opens in the mobile web browser, just as it does on a computer. If you tap the file and it does not open straight away, use the option to open it with a browser such as Chrome or Safari, and the page will render normally. Files received by email or message may need to be saved first, then opened from your files app. Since the format is a plain web page, no special app is required, and the same file works across phones, tablets and computers alike.

Open the file in a text editor to reach the HTML, change the tags or text, and save it, then reload it in a browser to see the result. A plain editor like Notepad works, but a code editor that colours the tags and points out mistakes makes the job far easier. Within a browser you can also view the page source to read the same markup without altering it. Because the file is only text, nothing special is needed to make changes, though a code editor turns an awkward task into a comfortable one.

An HTM file does not hold its images inside it. Instead it points to separate image files that the browser fetches when it draws the page. If you moved or emailed the .htm file on its own, those linked files were left behind, so the browser has nothing to show in their place. The fix is to keep the referenced files, often stored in a folder next to the page, together with the .htm file. When a page was saved from the web, browsers usually save that companion folder alongside it for exactly this reason.

A plain HTM file holds only the HTML markup and points to separate files for its images and styles. An MHT or MHTML file is a web archive that bundles the page together with those images and styles inside a single file, so the whole page travels as one piece. That makes an MHT handy for saving a complete page to read later offline, while a .htm is the page markup on its own. Browsers can open both, but they are different formats, and the .htm is the simpler, more common one.

📝 Summary

An HTM file is a web page written in HyperText Markup Language, and the single most important fact about it is that a .htm file is identical to a .html file. Both hold the same HTML, both open in any web browser, and both are served in the same way, so a file behaves the same whether it carries the three-letter or the four-letter extension. The two spellings exist only because of an old rule, the 8.3 filename convention of MS-DOS and early Windows, which capped extensions at three characters and forced html to be shortened to htm. When later systems lifted that limit, .html became the fuller, preferred standard, while .htm lived on for backward compatibility in older sites and tools. Inside, the file is plain text made of HTML tags that mark up headings, paragraphs, links and references to images and other media, which the browser fetches to complete the page. Opening one is easy, since double-clicking shows the finished page in a browser and a text editor shows the tags underneath, and no special software is needed either way. Because it is a real, viewable page, an HTM file also converts cleanly into a PDF or a word processor document when you want a fixed copy to print or share. You can freely rename a .htm file to .html, with the content untouched, though on a live website it is wise to add a redirect from the old address so saved links and search results are not broken. In short, an HTM file is nothing more mysterious than an ordinary web page wearing a shorter extension.