HTML Video - How to add video to a web site HTML Video Codes
HTML Video Tutorial and Information







HTML Tutorial - HTML Video Codes

Adding video code to your web site is basically the same as adding music to your site. Utilizing the <embed> tag is the most common way to add video to your HTML document. You can also link to the video file using an anchor tag and the <href> attribute:
<a href="myvideo.wmv">

How To Add Video To A Web Site

A video can be added to a web site by utilizing the <embed> tag (standard for adding media like music or video to a web page), or by simply linking to the video file. Just like the <img> tag, the <embed> tag does not need a closing tag.

Embedded Video

The video file is embedded in the HTML document:
<embed src="myvideo.wmv" />

Using A Link To Add Video

Link to video file:
<a href="myvideo.wmv">Click to play video</a>
Click to play video

This option will open the video file in a video- or media-player.


Video File Formats

Most commonly used video files formats are:

  • .avi - Audio Video Interleave - most common video files
  • .wmv - Windows Media Video files
  • .swf - Macromedia Flash files
  • .mov - Apple Quicktime Video files
  • .mpeg - Compression standards MPEG (Moving Picture Experts Group)

Video Control Attributes

With the <embed> tag you can use the following attributes to start the video automatically, let the user start the video, play a video continuously, and set the volume for the sound of the video:

  • autostart - start/do not start video file automatically
  • loop - repeat video file continuously
  • volume - set the volume for the video's audio. Allowed values are 0 - 100
The values for these attributes are true or false. The attribute hidden is also available as described in HTML music.

Set The Height And Width For The Video Area

You can set the height and width for the area the video is being played in using the following embedded video attributes:

  • width - set the width for the video
  • height - set the height for the video

Embedded Video Example

Here is the HTML code for an embedded video. The video will not start automatically (the user will have to click on "Play" to play the video), the volume for the sound of the video is set to "5", and the height and width for the video area are set to "100".
<embed src="myvideo.wmv" autostart="false" 
volume="5" height="100" width="100" />

More Video Adding Options

Youtube and Google Video offer ready to take HTML codes for most of their videos. Just copy their embedded video HTML code (or the link code for the video if you want to add the video as a link) and paste into your HTML pages.




HTML Related Links

© This Article is Copyrighted by WebmasterSeminar.com

Please do not copy or reproduce this article in whole or part, in any form, without mentioning the source and including a live link back to WebmasterSeminar.com - Thank You!

LINK TO THIS TUTORIAL:


Copy the code below and paste into your web page
<a href="http://www.webmasterseminar.com/htmlvideo.php">
Webmaster Seminar</a><br />
HTML Video Code - Free Information, Tutorials and HTML Resources