You could change the ID to a class if you like, and then there are various ways to target it. My go-to option is usually querySelector(.thevideo) or querySelectorAll(.thevideo).
I have cleaned up the code by separating out the CSS and Scripting, which results in much improved code that is vastly easier to work with and maintain. See https://jsfiddle.net/n0s5o9tw/3/ for an example.
Styling and structure (that is, CSS and HTML) is not a problem. Now, can a video behave like a video and play without Javascript?
I think not but I never tried. My reasoning is that neither CSS or HTML capture user actions beside the click on a link. Now, CSS3 and HTML 5 is something that I need to look at seriously, because I know it adds a whole bunch of stuff that I haven’t needed so I didn’t look at it.
And one of those things included in HTML5 is the video tag.
I’m curious why so much inline CSS though. In general, it is very early 90’s and, what is more important, very inefficient way to use CSS. Makes you work so much harder
You could do this with CSS using the :target pseudo-class, although this wouldn’t work with inline styles AFAIK; also you’ll need the ID as a fragment identifier.
Here’s a fiddle. May I ask why you’d want to use inline styles though? Usually you’ll only apply inline styles for dynamically generated CSS like e.g. animation.
Yes, I just read about that in your other thread. Well, if you want to stick to inline-styles only, then no, there’s no way to do this I’m afraid. :-\ I’d strongly suggest not to limit yourself by deliberately maintaining bad coding practices… also, what @PaulOBsaid of course.