Build a Video Compilation Page

Hi, I am having trouble completing the “Build a Video Compilation Page” can someone double check my code? The issues are:

  • Failed:5. You should have three section elements below your first p element.

  • Failed:6. Each section element should start with an h2 element that serves as the title for that section.

  • Failed:7. Each section element should contain a p element to introduce the video content as its second child.

  • Failed:8. Each section element should contain an iframe element as its third child.

But I feel like I answered each question correctly, and it is present in my code.

Thanks,

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Video Compilation Page</title>
</head>

<body>
    <main>
        <h1>The stock Market</h1>
        <p>The best trading app</p>
        <section>
            <h2>How it works</h2>
            <p>Trust the process</p>
            <iframe src="https://youtube.com/embed/L0nCc6KSb_4?si=5ozW4Uxp9TixTYF8"
            title="The stock market"
            width="250"
            height="150"
            </iframe>
        </section>
        
        <section>
            <h2>How it works</h2>
            <p>Trust the process</p>
            <iframe src="https://youtube.com/embed/L0nCc6KSb_4?si=5ozW4Uxp9TixTYF8"
            title="The stock market"
            width="250"
            height="150"
            </iframe>
        </section>

        <section>
            <h2>How it works</h2>
            <p>Trust the Process</p>
            <iframe src="https://youtube.com/embed/L0nCc6KSb_4?si=5ozW4Uxp9TixTYF8"
            title="The stock market"
            width="250"
            height="150"          
            </iframe>
        </section>
    </main>
</body>

</html>

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Please talk about what’s wrong and how you’re stuck fixing it.

your iframe elements are malformed

Ok thanks, how should the iframe elements be formed?

When I put “MDN iframe” into a search engine, I get this page:
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe

When in doubt, consult MDN!

1 Like