Q:

random video generator in HTML

I used a simple random number generator and named my mp4 files "1" "2" and "3" and my html page is blank
code:

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>Connor's video clock</title>
</head>

<body>
  <script>
    < div id = vid >
      < video width = "320"
    height = "240"
    controls >
      < source src = Math.floor((Math.random() * 3) + 1) + ".mp4" > Please update your browser < /source>
  </script>
</body>

</html>

A:

You can't put html tags within script tags.  Additionally, I think HTML tags should not have spaces between the angled bracket and the tag name.  Try this instead:

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>Connor's video clock</title>
</head>

<body>
  <div id = "vid">
    <video width = "320"
    height = "240"
    controls>
      <source id="vsrc" />
      Please update your browser.
    </video>
  </div>
  
  <script>
    document.getElementById("vsrc").src = Math.floor((Math.random()*3)+1) + ".mp4";
  </script>
</body>

</html>

Here, the javascript fills in the src for the video by selecting that element (by using document.getElementById()) and then altering the src attribute.

