Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLSourceElement
  4. type

HTMLSourceElement: type property

Thetype property of theHTMLSourceElement interface is a string representing theMIME type of the media resource.

It reflects thetype attribute of the<source> element.

Value

A string.

Examples

html
<video>  <source       src="large.webp"    type="video/webp"    media="screen and (width >= 600px)" /></video>
js
const el = document.getElementById("el");console.log(el.type); // Output: "video/webp"

Specifications

Specification
HTML
# dom-source-type

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp