HTML and CSS Reference
In-Depth Information
Figure 4-10. Nested figures after a healthy dose of CSS
Before HTML5 there was no easy way to explicitly associate a picture with a caption. Each of these figures
might have been wrapped in a div or perhaps a list item, and each caption might be a heading or
paragraph, but the only thing that related each caption to its image was their proximity. Now the
figcaption element clearly and emphatically describes the content in its parent figure and can't be
mistaken for anything else.
Required Attributes
There aren't any required attributes for the figcaption element.
Optional Attributes
The figcaption element doesn't offer any optional attributes.
iframe
The iframe element designates an inline frame , sometimes called a floating frame , that can display the
contents of a separate document—or even a completely separate website—within a confined space on the
rendered page. The spec refers to this as a nested browsing context , which is pretty much what it sounds
like: a browser within a browser. The content inside the frame exists independent of the surrounding page,
and the surrounding page is largely ignorant of anything happening within the frame. The two pages can
communicate with each other via JavaScript or server-side programming languages, but for all intents and
purposes, the iframe element forms a self-contained window onto another website.
A src attribute specifies the URL of the page to load into the frame, but the iframe element itself may
also contain other text or markup as fallback content to be displayed in browsers that don't support the
iframe element (such as very old browsers, text browsers, and some mobile devices).
Any CSS styles that apply to the parent document or to the inline frame itself don't apply to the content
within the frame, and styles that apply to the embedded content don't have any effect on the parent
document. You can embed pages from external websites, but you should only do so with the permission of
Search WWH ::




Custom Search