Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are the audio and video elements for html5 inline or block elements?

Tags:

html

I was wondering if the audio and video elements block or inline elements?

like image 325
SNIU Avatar asked Apr 09 '11 18:04

SNIU


1 Answers

I ran the following web page in Chrome 11...

<!DOCTYPE html>

<audio></audio>
<canvas></canvas>

<script>
var c = document.getElementsByTagName('audio')[0];
alert(getComputedStyle(c, null).display);
</script>

...and it reported inline for both canvas and audio. For what it's worth.

like image 149
sdleihssirhc Avatar answered Sep 18 '22 15:09

sdleihssirhc