HTML: MIME Type
This HTML tutorial explains the basics of MIME Type with syntax and examples.
Description
A MIME type (or media type) is an identifier for file formats or format contents on the Internet. MIME stands for Multipurpose Internet Mail Extensions and all MIME types are officially maintained by the Internet Assigned Numbers Authority (IANA). MIME types are traditionally written in all lowercase, but MIME types are actually case in-sensitive.
HTML elements such as the <a>, <embed>, <link>, <object> and <style> tags will use a MIME type in the type attribute.
Syntax
The syntax for a MIME type is:
type/subtype
Parameters or Arguments
- type
-
The type is a string value. Here is the list of currently registered types for MIME type:
type Description application Represents any type of binary data audio Represents any type of audio file example Represents any type of media used for "examples" font Represents any type of font file image Represents any type of image including animated gif's, but it does not include video files message Represents any type of message file model Represents any type of model file multipart Represents documents that are broken into multiparts with different MIME types in each part text Represents any type of text data that is human readable video Represents any type of video file - subtype
- The subtype is a string value that consists of the media format such as html or javascript, for example.
Example
Here are examples of some of the more commonly used MIME types:
application/ecmascript application/javascript application/json application/octet-stream application/ogg application/pdf application/x-shockwave-flash application/sql application/x-www-form-urlencoded application/xml application/zip audio/mpeg audio/ogg audio/wave audio/webm image/gif image/jpeg image/png image/svg+xml multipart/form-data multipart/byteranges text/css text/csv text/html text/javascript text/plain text/xml video/mp4 video/ogg video/webm
Advertisements