Sams Teach Yourself HTML 4 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Put Your HTML Page Online Today
- I. Your First Web Page
- Hour 1. Understanding HTML and XML
- Hour 2. Create a Web Page Right Now
- Hour 3. Linking to Other Web Pages
- Hour 4. Publishing Your HTML Pages
- II. Web Page Text
- Hour 5. Text Alignment and Lists
- Hour 6. Text Formatting and Font Control
- Hour 7. Email Links and Links Within a Page
- Hour 8. Creating HTML Forms
- III. Web Page Graphics
- Hour 9. Creating Your Own Web Page Graphics
- Hour 10. Putting Graphics on a Web Page
- Hour 11. Custom Backgrounds and Colors
- Hour 12. Creating Animated Graphics
- IV. Web Page Design
- Hour 13. Page Design and Layout
- Hour 14. Graphical Links and Imagemaps
- Hour 15. Advanced Layout with Tables
- Hour 16. Using Style Sheets
- V. Dynamic Web Pages
- Hour 17. Embedding Multimedia in Web Pages
- Hour 18. Interactive Pages with Applets and ActiveX
- Hour 19. Web Page Scripting for Non-Programmers
- Hour 20. Setting Pages in Motion with Dynamic HTML
- VI. Building a Web Site
- Hour 21. Multipage Layout with Frames
- Hour 22. Organizing and Managing a Web Site
- Hour 23. Helping People Find Your Web Pages
- Hour 24. Planning for the Future of HTML
- VII. Appendixes
- A. Readers' Most Frequently Asked Questions
- B. HTML Learning Resources on the Internet
- C. Complete HTML 4 Quick Reference
- D. HTML Character Entities
Embedding Video in a Web Page
The HTML page in Figure 17.3 demonstrates the use of <embed /> with a video clip in the Windows AVI (Audio-Video Interleave) format. The <embed /> tag in Figure 17.3 also includes the autostart and loop attributes, which tell Netscape's LiveVideo plug-in to start playing the video when the page loads and to repeat it as long as the page is being displayed. Figure 17.4 shows the resulting page as viewed with Netscape Navigator 4.
Figure 17.3 You can embed a video into a Web page with the same <embed /> tag used to embed sound.
Figure 17.4 This is the page in Figure 17.3 as seen in Netscape Navigator 4. If this page were a computer screen, the fractal would be spinning and a soundtrack would be playing.
Microsoft Internet Explorer will recognize the <embed /> tag and try to find an OLE-compliant Windows application to display the media file. In the case of AVI video, the Windows Media Player application will usually be embedded into the Web page, as shown in Figure 17.5.
Figure 17.5 This is the page in Figure 17.3 as seen in Microsoft Internet Explorer 5. The Windows Media Player is automatically embedded in the Web page.
Notice that the size of the video is reduced to make room for the Media Player controls. This isn't ideal, since it makes the video appear differently in Internet Explorer than it does in Netscape Navigator. In the next section of this hour you learn how to remedy this problem.
When Navigator and Explorer encounter an <embed /> tag, they basically try their hardest to find some way to embed the media file directly in the Web page. As a Web page author, you can't predict what plug-in or helper application will be selected, but you can at least try to put some instructions on the Web page telling your audience from where to download a suitable player.
You can use <embed /> with any type of audio, video, or interactive multimedia files as long as your audience has the correct player software installed.
Unfortunately, you as a Web page author have no control over or knowledge of which file types and applications people who visit your pages will have configured on their computers, or even how many visitors will be using a Microsoft Windows operating system. So the exotic uses of <embed /> are probably best left to corporate intranets or other situations where the page publisher has some control over the intended audience's computer setup.
Trying to Please Everybody | Next Section

Account Sign In
View your cart