3. Width and Height
<iframe src="#" width="..." height="...">...</iframe>
As with the image element, you should always specify the amount of space the <iframe>
element is suppose to take up on a page. This allows the browser to reserve the appropriate amount of space for the element, even if it takes longer to load than the rest of the page. These attributes are also important when pulling in external websites, as they may be built to use the whole page themselves.
- Previous
- Next