O'Reilly logo

Microsoft® HTML5 Step by Step by Faithe Wempen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inserting Graphics

Inserting a graphic on a Web page is as simple as placing an <img> tag where you want the graphic to appear, like this:

<img src="logo.gif">

Note

HTML5 also supports a <figure> tag for inserting images that is discussed later in this chapter on Including Alternate Text for Graphics. However <figure> is not a replacement for the <img> tag; it’s a container tag into which you place an <img> tag. You can then use the <figurecaption> tag to assign a caption to the figure; the caption stays with the image wherever it floats on the page.

As you saw in Chapter 5, when a file resides in the same folder as the HTML document that references it, you can refer to that file using the file name only, without any additional path information. If ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required