Search code examples
htmlweb-component

Is the video tag already a WebComponent?


I am studying the topic WebComponent and by chance I came across a video tag. And for me it looks like this is a WebComponent in which you pass the video source via slots.

Question 1: Is this correct?

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

Question 2: What other native WebComponents are available?


Solution

  • No.

    The video element is defined in the core HTML specification (as is the source element).

    Web Components are a collection of technologies used to extend HTML (with custom elements).