.HTML and .HTM

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I know a lot about HTML and now I'm teaching myself PHP to make my
pages more dynamic. However, all this time, I have no clue what the
difference is between .HTML files and .HTM files. Someone told me that
.HTM files were newer than .HTML files. Another source said that .HTM
files worked better with links or something.

Re: .HTML and .HTM

The Numerator wrote:

Quoted text here. Click to load it

HTML files are HTML files, no matter what file extension they have (if they
have one at all). A .html file extension is normal. A .htm file extension
is typically legacy from DOS and Windows machines predating the mid-90s
(which used filesystems which only supported three character file
extensions). Over HTTP there are no file extensions, only URLs which might
happen to have the characters ".html" in them as they might map directly
onto a filesystem.

David Dorward       <http://blog.dorward.me.uk/ <http://dorward.me.uk/
                     Home is where the ~/.bashrc is

Re: .HTML and .HTM

On Thu, 23 Mar 2006, David Dorward wrote:

Quoted text here. Click to load it

A pity that MSIE plays by totally different rules.  In fact by several
different sets of rules, depending on which version of MSIE is
involved.  I knew that there were some significant changes with XP
SP2, but I wasn't fully aware of their implications.  A discussion on
dciwam called my attention to some new violations of RFC2616
introduced by the XP SP2 changes, to add to the ones which were known
about before.

As I just learned there, and then proved for myself --

On such a browser-like object, if you send it application/xhtml+xml
with a .xhtml filename extension, it offers to download it; but if you
send it with a .html extension (still with the XHTML content-type), it
does its best to render it as HTML.  Sigh.

On my older Win2K system with IE6, on the other hand, it invites me to
choose to either download the item or open it with Mozilla.  Which by
sheer chance is what it ought to do (for this specific content-type)
according to RFC2616 and my own preferences settings.  What a pity
that they evidently have no intention of spreading that correct
behaviour more widely (quite the contrary, judging from the observed
XP-SP2 changes).

Re: .HTML and .HTM

Alan J. Flavell wrote:

Quoted text here. Click to load it
Quoted text here. Click to load it

Just out of interest, what does it do if you send application/xhtml+xml with
an extention like ".php"?

Re: .HTML and .HTM

On Fri, 24 Mar 2006, Jim Higson wrote:

Quoted text here. Click to load it

Just how "like" .php do you need it to be? (I couldn't - at least not
within a limited amount of fiddling - persuade our server not to parse
the file for PHP if I gave it that filename extension.)

But I wouldn't have expected PHP to have any special meaning to
MessIE.  If I try some oddball filename extension, which I've also
configured in our server to be sent as the XHTML content-type,
application/xhtml+xml, then MessIE (XP SP2 IE6) offers to download
this "unknown file type".

However, if in Windows I create[1] a new "File Type", with filename
extension .karl, and associate it with a web browser, say Firefox,
then MessIE offers the option to open the file.  If I take that
option, it is evident that MessIE has downloaded a temporary copy to
file, and has then invoked Firefox to open the temporary file.

This is almost staggering towards the behaviour that the web
interworking specifications require, and what www-compatible browsers
have always implemented - what is wrong with IE is that it's going via
the filename extension - when, according to RFC2616, it is required to
honour the MIME type, without consideration of any "filename
extension" which it might discern in the URL.

h t h

[1] e.g Windows control panel> Folder options> File Types

Re: .HTML and .HTM

Alan J. Flavell wrote:
Quoted text here. Click to load it

This is only true if you assume someone else's rules are the right
ones.  At the time Desktops were dominated by Microsoft.  The makers of
the "rules" happened to be on *nix.

Plus look at the bandwidth microsoft is saving the world elmininating
that one character.  If every HTML page being called world wide was now
HTM the savings would be huge!

So rather than condeming Microsoft, we should be thanking them and
scolding anyone that uses HTML...

Re: .HTML and .HTM

Travis Newbury wrote:
Quoted text here. Click to load it

If that's the real reason you'd save even more bandwidth by configuring
the server to serve html pages without any extension at all.

Of course, that savings would be trivial compared to that which could be
had if everyone optimized image sizes and used cleaner markup.

(and yes, I know you were joking)


Nick Theodorakis
contact form:

Re: .HTML and .HTM

Nick Theodorakis wrote:
Quoted text here. Click to load it

Why should I optimize? MS Publisher does a dandy job of keeping all the
styling handy right there interspersed throughout my markup! And why
bother resampling those 3000+ pixel on a side images when I can
miraculously make instant thumbnails with width and height attributes?
Then I can fit 50 or more images on a page!

Take care,

Re: .HTML and .HTM

On Fri, 24 Mar 2006, Travis Newbury wrote:

Quoted text here. Click to load it

I suspect that you're being ironic.  Unfortunately there may be many
readers who know so little history that they might literally believe

Have a look at
and see if you can discern dominance of any particular OS.  NeXT,
VAX/VMS, IBM VM/CMS, Macintosh, all feature in different ways.

(P.s the claim made in that page that the VM/CMS browser was
non-existent was not really true.  Some of us supported a port of the
W3 client to VM/CMS: it wasn't very good, but it certainly wasn't
"nonexistant"(sic) as that document claims.  In fact, see
But that's all a long time ago now)

But the MIME and HTTP specifications are not just a private affair of
the WWW - they have proper IETF standards-track specifications about
their behaviour on the Internet.  They are carefully defined to be
rather OS-agnostic.  *If* the claim had been true that they were
unix-centric, do you suppose they would have defined the canonical
newline representation to be CRLF?  Surely it would have been LF
alone, just as it is in unix?

Quoted text here. Click to load it

I know you're joking, really, but...

We would be entitled to scold /anyone/ who uses filename extensions in
their URLs.  To anyone who takes theory as more important than
practice, it's clear that they have no business being there at all.

(If you /really/ care about network bandwidth, you should be aware
that most browsers nowadays support gzip compression, and (x)HTML
lends itself very well to such compression.  You could save file space
too, in that way).

Re: .HTML and .HTM

Quoted text here. Click to load it
Quoted text here. Click to load it

Yup, Microsoft has never been concerned with the end user's bandwidth.  Take
a look at this code I found on the site where I work.  It was created by
copying and pasting directly from MS Word to a WYSIWYG editor:

<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo2;
tab-stops: list .5in"><span style="FONT-SIZE: 12pt; FONT-FAMILY: Arial;
mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 'Times New Roman';
mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language:
AR-SA"><font face="Arial, Helvetica" size="2">To request a Compliance
Inspection, or Contact, please call the EAB Hotline at 866-325-0023 or email
at</font> <a href="mailto:blah at michigan.gov"><font face="Arial,
Helvetica" size="2">Inmanca@michigan.gov</font></a><font face="Arial,
Helvetica" size="2">.</font></span></p>

All that to mark up a single sentence.  Amazing.

Matt Clara

Re: .HTML and .HTM

Matt Clara wrote:
Quoted text here. Click to load it

One of my favorite examples of MS bloat was an HTML email I received.
Including headers, it was over 9000 bytes. The actual message content
was a single sentence of less than 100 bytes.

According to the headers, it was created in MS Word. Unbelievable. :)

Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.

OT: Bloat (was Re: .HTML and .HTM)

While the city slept, kchayka (usenet@c-net.us) feverishly typed...

Quoted text here. Click to load it

I used to work in a government office here in the UK. Being Civil Service,
there were naturally thousands of users on the overall network. One day we
all got an email from one of the admins to warn us that - although it was
fun to add little bits of clipart and other such things to emails, making
them a little less dreary to the reader - this did in fact increase the size
of the email which was significant when it was being sent to such a large
number of people - causing the servers to creak...

This message went on to a list of bullet points on good and bad email
practice, and how to get a message across without increasing the load on the
servers so much. In all, it was a good concise message, about 10-15 lines

Unfortunately - and with a most elegant irony - this message was in the form
of a 20k Word doc attached to the email!!!!! Oh how I giggled...


Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"

Re: OT: Bloat (was Re: .HTML and .HTM)

nice.guy.nige took the hamburger, threw it on the grill, and I said "Oh

Quoted text here. Click to load it

That's insane. Wow.

Quoted text here. Click to load it

mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM

NP: "The Way It Is" -- Tesla

"Now, technology's getting better all the time and that's fine,
but most of the time all you need is a stick of gum, a pocketknife,
and a smile."

-- Robert Redford "Spy Game"

Re: .HTML and .HTM

The Numerator wrote:

Quoted text here. Click to load it

File extentions (the bit after the dot) have no special meaning on the web.
Windows uses them, and Apache usually does, but they're not universal in

Re: .HTML and .HTM

The Numerator wrote:

Quoted text here. Click to load it

A file with a name that ends in '.html' is technically just a file with a
name that ends in '.html'.  Windows and some other operating systems
recognise a file type based on the extension.  In those operating systems,
the extension .html refers to a file containing hyper text markup language.
In reality any file can have an extension .html, but windows and some other
OSs may have a problem determining the type of content.

The difference between .html and .htm...  Once upon a time, microsoft
operating systems had a 8.3 file name limitation.  The 8 referring to the
number of characters in the file name and the 3 referring to the number of
characters in the extension.

On my Amiga, the computer that I was using back when DOS and Windows were
stuck with 8.3, and on many other systems, the restrictions were not as
limiting.  It made more sense to some people to use a fourth letter to
describe the html file type, since html was already a four letter acronym.
To transfer the file to a windows computer, the fourth character had to be
dropped, thus the creation of .htm files.

As far as better or worse goes, there is a very slight performance
improvement using .htm rather than .html in your file names.  The addition
of the single character is one extra character that has to be uploaded when
retrieving the file.  If however you are that concerned with bandwidth,
there are lots of other ways to reduce the size of your files, such as
removing excess white space from the live pages.  Leave the white space in
your development versions, and just strip it for the live version.

Carolyn Marenger

Re: .HTML and .HTM

The Numerator wrote:
Quoted text here. Click to load it

There is no general difference.  Absolutely no difference. If there
was, then we'd all know it and we wouldn't keep worrying about whether
there was or not.

Use one and be consistent. Inconsistency here _is_ a nuisance.

Many years ago, some flavours of Windows had a preference for .htm as
only <=3 character extensions had good support. This is no longer the

Site Timeline