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
.
MIME types describe the media type of content either in email or served by web servers or web applications and are intended to help guide a web browser in how the content is to be processed and displayed. Examples of MIME types are: text/html for normal web pages text/plain for plain text. Mime.contentType (type) Create a full content-type header given a content-type or extension. When given an extension, mime.lookup is used to get the matching content-type, otherwise the given content-type is used. MIME media types indicate the following things − How different parts of a message, such as text and attachments, are combined into the message. The way in which each part of the message is specified. The way different items are encoded for transmission so that even software that was designed to work only with ASCII text can process the message.
Every Internet media types identifier must comply with the following format:
Html Mime Type Pdf
[type]/[tree.][subtype][+suffix][;parameters]
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.
Html Mime Types
image/png
application/rss+xml
video/mp4; codecs='avc1.640028'
application/vnd.google-earth.kmz