W3Schools

home HOME

Media Basic
Media HOME
Media Intro
Sound Formats
Video Formats
Playing Sounds
Playing Videos
Windows Formats

Object Element
Object Intro
Object QuickTime
Object RealVideo

References
Tag Reference
Media Player Ref
MIME Reference

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

Playing Videos On The Web

Previous Next

Videos can be played "inline" or by a "helper", depending on the HTML element you use.


Inline Videos

When a video is included in a web page it is called inline video.

Inline video can be added to a web page by using the <img> element.

If you plan to use inline videos in your web applications, be aware that many people find inline videos annoying. Also note that some users might have turned off the inline video option in their browser.

Our best advice is to include inline videos only in web pages where the user expects to see a video. An example of this is a page which opens after the user has clicked on a link to see the video.


Using A Helper (Plug-In)

A helper application is a program that can be launched by the browser to "help" playing a video. Helper applications are also called Plug-Ins.

Helper applications can be launched using the <embed> element, the <applet> element, or the <object> element.

One great advantage of using a helper application is that you can let some (or all) of the player settings be controlled by the user.

Most helper applications allow manual (or programmed) control over the volume settings and play functions like rewind, pause, stop and play.


Using The <img> Element

Internet Explorer supports the dynsrc attribute in the <img> element.

The purpose of this element is to embed multimedia elements in web page:

<img dynsrc="video.avi" />

The code fraction above displays an AVI file embedded in a web page.

Note: The dynsrc attribute is not a standard HTML or XHTML attribute. It is supported by Internet Explorer only.


Using The <embed> Element

Internet Explorer and Netscape both support an element called <embed>.

The purpose of this element is to embed multimedia elements in web page:

<embed src="video.avi" />

The code fraction above displays an AVI file embedded in a web page.

A list of attributes for the <embed> element can be found in a later chapter of this tutorial.

Note: The <embed> element is supported by both Internet Explorer and Netscape, but it is not a standard HTML or XHTML element. The World Wide Web Consortium (W3C) recommend using the <object> element instead.


Using The <object> Element

Internet Explorer and Netscape both support an HTML element called <object>.

The purpose of this element is to embed multimedia elements in web page:

<object data="video.avi" type="video/avi" />

The code fraction above displays an AVI file embedded in a web page.

A list of attributes for the <object> element can be found in a later chapter of this tutorial.


Using A Hyperlink

If a web page includes a hyperlink to a media file, most browsers will use a "helper application" to play the file:

<a href="video.avi">
Click here to play a video file
</a>

The code fraction above displays a link to an AVI file. If the user clicks on the link, the browser will launch a helper application like Windows Media Player to play the AVI file.


Previous Next


How to be a Smart and Efficient Web Developer?

Use a web development platform that will help you save a lot of time and bring excitement to your daily development work. It will also create professional best-practices around your code development and team collaboration.

Try Springloops now, the web development platform




diploma   

Get Your Diploma!

W3Schools' Online Certification Program is the perfect solution for busy professionals who need to balance work, family, and career building.

The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.

The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.



Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999
SITE SEARCH
 
About W3Schools
W3Schools Forum
ASP.NET Web Hosting
ASP.NET
Web Hosting
WEB HOSTING
$15 Domain Name
Registration
Save $20 / year!
UK Domain Names
UK Web Hosting

Alojamiento Web
Buy UK Domain Names
Register Domain Names
Cheap Domain Names
Cheap Web Hosting
Best Web Hosting
Domain Name Registration
PHP MySQL Hosting
Top 10 Web Hosting
Web Hosting Providers
Web Hosting Company
UK Web Hosting
UK Reseller Hosting
Web Hosting
WEB BUILDING
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Custom Programming
FREE Trial or Demo
Web Content Manager
Forms,Web Alerts,RSS
Ecommerce Software
Learn XML with XMLSpy®
Azbuz Blog
SHOPPING
UK Wholesalers
UK Wholesale
UAE Dubai Property
Private Student Loans
UK Dropshippers & Wholesalers Directory
EDUCATION
US Web Design Schools
HTML Exam
YELLOW PAGES
www.nettkatalogen.no
www.gulex.dk
www.gulex.se
www.gelbex.de
www.teloos.fi
www.teloos.fr
www.teloos.co.uk
www.teloos.at
www.teloos.de