Back to Freecodecamp

Step 3

curriculum/challenges/english/blocks/workshop-build-a-video-display-using-iframe/68ba9c4f1688914d72876094.md

latest1.1 KB
Original Source

--description--

In the first lesson on the iframe element, you learned it's a replaced element just like img. That means it can also take the width and height properties to determine how tall and wide it should be.

Give your iframe element a width of 560 and a height of 315.

--hints--

Your iframe element should have a width attribute set to 560.

js
const iframeEl = document.querySelector('iframe')
assert.equal(iframeEl?.getAttribute('width'), '560')

Your iframe element should have a height attribute set to 315.

js
const iframeEl = document.querySelector('iframe')
assert.equal(iframeEl?.getAttribute('height'), '315')

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Display Videos in an iframe</title>
  </head>
  <body>
    <h1>iframe Video Display</h1>

    <iframe
--fcc-editable-region--
      
--fcc-editable-region--
    >

    </iframe>
  </body>
</html>