Add videos in web
how to add and view videos in web page?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lalit MRank #1,186 · 1.5K reputationPosted Nov 18, 2009, 6:48 PM EST
First Upload Your Video to Your Web Server
Create your video as a .mov or .mp4 file - and then upload it to your Web server. I recommend testing the URL pointing to your movie file before you build your Web page so that you know that it works correctly.
Write down the full URL to your video file - you'll need it when you write your HTML.
Use the Object Tag to Embed Your Video Validly
The object tag is not widely supported, but it is the only way to add a QuickTime video into your pages using valid HTML. There are two attributes that you need to include to get the video to play correctly:
You'll also want to set the width and height of the object - set the width to the width of the movie and the height to the height plus 15-20 pixels extra to include the controls. Your object tag will look like:
Parameters Make the Object Work
The only parameter that you need is the src parameter - this tells the browser where to find the movie to play. Set the src attribute to the URL of your movie:
Some other parameters that can be useful to control your video and make it more user-friendly are:
Inside the
Finally, Include an Embed Tag with the Same Information
If it is very important to you that all your pages validate, then you should not include this section. But remember that only people with some browsers like Safari and Opera will be able to view your video.
The embed tag should look like this. Note that all the fields are the same as the :
And then close the object tag:
You can see a working video online and view the source to see the entire source of the object and embed tags in action: Rambling