InterviewSolution
Saved Bookmarks
| 1. |
How to caption an image |
|
Answer» Rewrite the following code to apply the caption “This is an image of something interesting’ <IMG src="path/to/image" alt="About image" /> <p>Image of Mars. </p>There is no easy or SEMANTIC way to associate the caption, WRAPPED in a paragraph tag, with the image element itself. Using HTML5 <figure> element along with <figcaption> element, we can now semantically associate captions with their image counterparts. Example <figure> <img src="path/to/image" alt="About image" /> <figcaption> <p>This is an image of something interesting. </p> </figcaption> </figure>Output |
|