Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

video tag with nested children

Tags:

html

css

video

Is it possible to have a <video> tag with nested children? For example:

  <video src="../assets/asset1.mp4" controls>
     <div>inner div</div>
  </video>

inner div never shows up, nor can be found using Developer tools. What is the workaround?

like image 804
sanjihan Avatar asked Nov 01 '25 12:11

sanjihan


1 Answers

You cannot place content inside of a video tag, if you're trying to put something over the video for some reason, I recommend researching absolute positioning. If you're trying to create something for a fallback, you can set up a script to trigger if the video fails to load.

like image 68
Blake Connally Avatar answered Nov 03 '25 04:11

Blake Connally



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!