Video Element

Hello everyone,
I was working on a personal project and trying to insert a video into it. However, the video doesn’t play, but it doesn’t display the “video not supported” text either. Is there a way this could be fixed? the video element is right near the bottom.

<!DOCTYPE html>
    <h1>Hello World!</h1>
    <p>This is my <strong>first</strong> website, I hope you <em>enjoy</em> it.</p>
    <h2> About me </h2>
    <h3> Ambition </h3>
    <p>My ambition is to become a software engineer. I am taking the <br>Full-stack development course on <strong>codecademy</strong> to help me achieve that goal. <br>My dream job is one at Google.</p>
    <h3> Favourite foods </h3>
      <li>Indomie <br><img src="" alt="picture of instant ramen"/></li>
      <li>Swallow <br><img src="" alt="picture of nigerian swallow/fufu" /></li>
      <li>Jollof Rice <br><img src="" alt="picture of Jollof Rice" /></li>
    <h3> Favourite film franchises (in order) </h3>
      <li>Jurassic Park</li>
      <li>Harry Potter</li>
    <h3> College </h3>
    <p> My preffered college is MIT, though that is a serious reach for me. I think a more realistic goal would definitely be:
        <li> Carnegie Mellon Univeristy </li> 
        <li>University of California: Irvine</li> 
      <video src="" width="360" height="200" controls>
      video not supported
    Both are very good schools that I would love to go to.</p>
    <img src="Screenshot (3).png" alt="Me struggling with my internship" />

As far as I’m aware, the HTML video tag doesn’t support using YouTube videos as a source. You would need to download the video as an mp4 or the like, or else use YouTube’s built in embed tags.

I think the best way to do it would be to use an iframe to link the youtube video.

<iframe width="420" height="315"

Check here for more information on iframes

1 Like


Ethan’s suggestion is accurate. The best alternative to add a Youtube video to your web page is by using an “iframe” tag. Moreover, you can add parameters at the end of the video url, so you can manage things, such as autoplay, loop, mute, and controls.

<iframe width="420" height="315"