How To Do Everything With Html Xhtml [Electronic resources]

James H. Pence

نسخه متنی -صفحه : 126/ 75
نمايش فراداده

Quick Reference: Audio and Video

We live in a world dominated by audio-visual media. Movies, television, radio, CDs, videos, DVDs, video games, and, yes, the Internet are all a part of our media culture. As a result, the temptation to at least experiment with audio and video to your Web pages may be too great to resist. However, keep in mind that audio and video can drastically slow down your pages. If you are merely creating a personal Web site for your own use and enjoyment, then don’t worry about it. Be creative and have a blast! On the other hand, if you are creating your site for business purposes, or if you are working as a Web developer for other people’s sites, consider carefully whether audio-visual media will genuinely contribute to the site. If its only reason for being there is that it looks “cool,” you may be better off leaving it out. In any case, here’s a summary of how to add audio and video files to your Web pages:

To Do This

Use This

Link to an external

audio file

<a href=">Link</a>

Link to an external

video file

<a href=">Link</a>

Embed an audio file

with <object>

<object data=" type="audio/wav"

height="##" width="##" autostart="true">

</object>

(autostart="false" if you don’t want the audio to start automatically)

Embed an audio file

with <bgsound />

<bgsound src=" loop="#" />

Embed an audio file

with <embed>

<embed src=" autostart="false" (or true)

height="##" width="##"> </embed>

Embed a video file

with dynsrc

<img dynsrc=" />

Embed a video file

with <object>

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

height="##" width="##" >

</object>

Embed a video file

with <embed>

<embed src="

height="##" width="##"

autostart="true" (or false) loop="false" (or true) >

</embed>