Internet media types

Internet media types, formerly known as "MIME types" or "Content-types", is a standard designed to indicate the type of information a file or piece of data contains. In HTML, this identifier can be useful for knowing the type of a file before downloading and being able to access it. It's a good practice to provide media type information whenever possible, like in the case of elements having attributes like type, enctype, formenctype and accept.

Every Internet media types identifier must comply with the following format:

[type]/[tree.](Optional)[subtype][+suffix](Optional)[;parameters](Optional)

As you may have already noted, the "type" and "subtype" must be present in any Internet media type. In the following list are some examples containing each of the parts outlined before.

Commont internet media types

Currently, there are nine top-level types, which are: "application", "audio", "example", "image", "message", "model", "multipart", "text" and "video". The following section provides some of the most popular media types used in web applications.

Type application

Type audio

Type image

Type message

Type model

Type multipart

Type text

Type video