How to embed video from any website to my HTML page?

8 replies
Hello everyone,

I'm learning to code in HTML, trying to make an HTML page in which different videos will be embedded. I want to know how to embed the videos from YouTube, DailyMotion and other video websites? There is a video tag in HTML but I guess it is for those cases in which your video is not on the net. Please clear my confusion.
#embed #html #page #video #website
  • Profile picture of the author Fredzmints
    There is embed codes in youtube, vimeo.

    <iframe width="560" height="315" src="https://www.youtube.com/embed/IpbDHxCV29A" frameborder="0" allowfullscreen></iframe>
    {{ DiscussionBoard.errors[10511863].message }}
  • Profile picture of the author Arshalan008
    you go to youtube or DailyMotion or other website then you will see a button named embed. if you click the button then you got a code. copy and paste your html.
    if the video is not available in internet then it does not show. you see a black color player and see "Delete this video" or any other speach
    {{ DiscussionBoard.errors[10512685].message }}
  • Profile picture of the author apsarasisodia
    Thanks, one more thing... Can we use <video> tag to embed videos of YouTube? In other words, I want to know the uses of video tag of HTML.
    {{ DiscussionBoard.errors[10516148].message }}
    • Profile picture of the author PBScott
      Originally Posted by apsarasisodia View Post

      Thanks, one more thing... Can we use <video> tag to embed videos of YouTube? In other words, I want to know the uses of video tag of HTML.
      Code:
           <video width="320" height="240" controls>
        <source src="movie.mp4" type="video/mp4">
        <source src="movie.ogg" type="video/ogg">
        Your browser does not support the video tag.
          </video>
      Video is used like the above. If you knew the exact folder of the video, you could probably access it this way, however the actual address is probably buried in YouTube database. You would not want to display a YouTube video this way anyhow, as it is not asynchronous like the YouTube code is, and will slow down your website.
      Signature

      If you don't look at this => Really Funny Shirts <= you missed something in life

      {{ DiscussionBoard.errors[10518038].message }}
      • Profile picture of the author apsarasisodia
        Thanks a lot guys, this helped me a lot. I will use iFrame whenever I want to embed videos from online sources like Youtube or Dailymotion. I will use <video> tag for embedding videos which are there in my system.
        {{ DiscussionBoard.errors[10581313].message }}
  • Profile picture of the author 3wCorner
    Go to Youtube. Play the video you want. Click on Share then click on Embed. Just copy and paste the code to your website and publish it.
    {{ DiscussionBoard.errors[10584089].message }}
    • Profile picture of the author apsarasisodia
      Originally Posted by 3wCorner View Post

      Go to Youtube. Play the video you want. Click on Share then click on Embed. Just copy and paste the code to your website and publish it.
      Another great trick. Thanks a ton 3wCorner for your reply. I have now another option because of you.
      {{ DiscussionBoard.errors[10586220].message }}
  • {{ DiscussionBoard.errors[10587456].message }}

Trending Topics