Why <video> ?

There are several reasons for picking a new element in HTML 5 as opposed to reusing <object> :

<object> is already very complex. We plan to fix the interoperability story, but making it even more complicated by adding APIs that only work for some type of content is not desirable. This both makes the feature much harder to understand for web authors and harder to implement for implementors (as indicated by people from Apple and Opera for instance).

is already very complex. We plan to fix the interoperability story, but making it even more complicated by adding APIs that only work for some type of content is not desirable. This both makes the feature much harder to understand for web authors and harder to implement for implementors (as indicated by people from Apple and Opera for instance). Having a dedicated <video> element is better for semantics. Since you know the element will contain video you can then easily do specific things with it.

element is better for semantics. Since you know the element will contain video you can then easily do specific things with it. Since the element is separate you can design a specific video API on top of it that scripts can use.

This is quite different from XHTML 2 where every element can potentially embed video using the src attribute. I suppose this approach is appealing to some people, but it makes it much more complex to provide an API as currently that API is available on all elements. And all elements would also have a drawing API ( <canvas> ), grid API ( <datagrid> ) et cetera. Maybe to solve that problem you would use the magical role attribute with values such as canvas , video and datagrid . Besides that it would be in my opinion very confusing if the API changed on an attribute value why not just use a dedicated element?

Having a dedicated element also allows attributes specific to the functionality it provides. For instance, a ui attribute is considered for the <video> element that would let authors say that they want the user agent to provide the user interface.

Copyright © 2003-2020 Anne van Kesteren