Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
type
Collapse the table of content
Expand the table of content

type property

Gets or sets the MIME type of a media resource.

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.8Internet Explorer 9

 

Syntax

object.put_type(
            
        string
           type);object.get_type(
            
        string
          * type);

Property values

Type: string

A valid MIME type that specifies the type of media resource that src points to.

Standards information

Remarks

You can use the codecs parameter to specify the exact encoding of the media resource. The following code example shows a source element that uses a type attribute and the codecs parameter to specify how a video was encoded.


    
<source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>

 

 

Community Additions

ADD
Show:
© 2015 Microsoft