Chapter 5

HTML5 and Multimedia


check Working with images

check Playing audio

check Watching videos

Multimedia has taken over the Internet. Thanks to the popularity of websites like YouTube, these days if your website doesn’t support some type of multimedia content, your visitors will consider it old school and may pass it by. This chapter examines the multimedia features available in HTML5 and shows you how to implement images, audio, and video in your dynamic web applications.

Working with Images

The most basic type of multimedia to put on a web page is a picture. The old saying “a picture is worth a thousand words” is somewhat true, especially in the web world. Placing images on your web page can help break up the monotony of plain text, as well as help add to your content in an attractive manner. Often, the first thing a new website visitor will notice are the images.

The HTML standard has always supported placing images within web pages, but there are a few new tricks that you can try using HTML5 and CSS3 to make your images stand out. This section shows just how to do that.

Placing images

The img element allows you to place an image file on the web page. The img element uses ...

Get PHP, MySQL, & JavaScript All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.