A media type (also MIME type and content type) is a two-part identifier for file formats and format contents transmitted on the Internet. The Internet Assigned Numbers Authority (IANA) is the official authority for the standardization and publication of these classifications. Media types were originally defined in Request for Comments 2045 in November 1996 as a part of MIME (Multipurpose Internet Mail Extensions) specification, for denoting type of email message content and attachments; hence the name MIME type. Media types are also used by other internet protocols such as HTTP and document file formats such as HTML, for similar purpose.
A media type is composed of a type, a subtype, and optional parameters. Media type consists of top-level type name and sub-type name, which is further structured into so-called “trees”. Media types can optionally define companion data, known as parameters.
top-level type name / subtype name [ ; parameters ] top-level type name / [ tree. ] subtype name [ +suffix ] [ ; parameters ]
The currently registered top-level type names are: application, audio, example, font, image, message, model, multipart, text, video. An unofficial top-level name in common use is called chemical. Sub-type name typically consists of a media type name, but it may or must also contain other content, such as tree prefix (facet), producer’s name, product name or suffix – according to the different rules in registration trees.