An Internet media type is, generally speaking, a property of a data set, describing both the general type of data (such as "text" or "image" or "application"; the last one refers to program-specific internal data formats) and, as a subtype, a specific format for the data. The concept was originally defined as "MIME content types".
Media types relate to HTML as follows:
text/html) in the HTTP header
Content-Typeit sends along with the document. Normally servers are configured to do this by default when the file name ends with
.htm(depending on the system; please consult local documentation).
.zipto media type
application/zip), and it may provide users some tools for overriding such mappings or otherwise specifying the media type to be associated with a file or set of files. The description of the A element contains some additional notes related to audio and video and binary files in general.
HTML 3.2 Reference Specification
refers to RFC 1521
but that specification was superseded by
(in November 1996).
The procedure for registering types in given in
The official registry is kept at
In addition to standardized media types, there are media types which are in fact supported by popular servers and browsers. Appendix B of Special Edition Using CGI (by QUE) lists many of them. For an online list, see Multipart Internet Mail Extensions (MIME) in The HTML Sourcebook, 3Ed, by Ian S. Graham.
You can check what is the media type information sent by a server by using Delorie's HTTP Header Viewer.
There is an additional complication
caused by the fact that
Internet Explorer does not work according to the protocols
in this area. It often ignores the media type
announced in the
Content-Type and uses
the last few characters of the URL instead to determine
the method to be used.
(IE may also apply some "heuristics" based on the
actual content of the data!)
This means that in addition to making sure that the
server sends the correct media type information one should try
to name the file so that things might work on IE, too.
Thus, one should try to stick to commonly used conventional
file name suffixes like
.DOC for MS Word documents,
.XLS for MS Excel documents,
plain text documents, etc.