Mastering the Media: Complete HTML Course
Sobre a Aula

HTML video and its formats

When you embed videos into your HTML pages, it’s important to consider the formats that are widely supported by browsers.

There are three main video formats that you can confidently use, ensuring consistent and effective playback in various environments:

  • MP4 (MPEG-4): This format is widely accepted and recommended, serving as the standard used by YouTube. It provides a good combination of quality and compression, making it ideal for online videos.
  • WebM: Developed by a consortium including Mozilla, Opera, Adobe, and Google, the WebM format is supported by HTML. It is known for its high compression quality and is a solid choice to ensure viewing across various browsers.
  • Ogg: Another option to consider is the Ogg format, developed by the Xiph.Org Foundation. It is supported by HTML and offers a reliable alternative for video playback.

When choosing among these formats when embedding videos in your HTML pages, you ensure a consistent viewing experience for users, regardless of the browser they are using.

Browser support for the different formats is:

BrowserMP4WebMOgg
EdgeYESYESYES
ChromeYESYESYES
FirefoxYESYESYES
SafariYESYESNO
OperaYESYESYES
Entrar na conversa
Rolar para cima