Quackit Logo

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE hosting.

$1.99 Domain Names

With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.

HTML Video Codes

Print Version

So you've made a video, you've uploaded it to a web server on the Internet, and now you want to show it to your users?

No problem! This page provides you with all the code you need to do the job!

Embedding a video file

You can embed HTML video code into your web page using the <object> tag. To cater for browsers that don't support the <object> tag, you can nest the embed tag inside the <object> tag.

The parameters inside the param attributes allow you to customize your video.

Example Code:

Result:

This code embeds a MySpace video into the web page. MySpace uses Shockwave (or Flash) to present the video controls. You could just as easily embed a different video format and the user's browser should use the appropriate plugin to display the video and it's controls.

The <embed> Tag's Attributes

AttributeDescriptionPossible Values
autostartDetermines whether to start the video as soon as the page has loaded.
  • True
  • False
hiddenDetermines whether to hide the video. For example, if you just want background noise with no video.
  • True
  • False
loopDetermines whether to continously replay the video after it has finished.
  • True
  • False
playcountDetermines how many times to repeat the video.A number value
volumeDetermines how loud the audio should be.Number value between 1 and 100

Linking to a video file

The easiest way to include video on your website is to link to it. This is suitable if you don't want to actually embed the video within your HTML page. You can link to a video file using the <a> tag. All you need to do is write something like this:

<a href="http://mediaservices.myspace.com/services/media/embed.aspx/m=5385825">Watch this video</a>

This results in:

This assumes that the video file is in the specified location.

Video Formats

Some of the more common video formats are:

  • .swf - Shockwave/Flash File (by Macromedia/Adobe)
  • .wmv - Windows Media Player video format (by Microsoft)
  • .mov - Quicktime video format (by Apple)
  • .mpeg - Video compression format (specified by the Moving Pictures Experts Group)

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
               
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!