HTML5: How to specify self-contained content?
Solution:
HTML Code:
Explanation:
- This HTML code includes an image within a figure element.
- The image is self-contained, as it contains all necessary information within the image tag itself.
- Self-contained content is beneficial for accessibility and portability, as it ensures that all relevant information, such as alternate text, dimensions, and source, is included directly within the HTML.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.