Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms HTML Mastery

I don't understand what this question is asking for me to do. I've gotten it wrong 2 times. Please give me more hints.

HTML Section Mastery Challenge Question: Set that text input to contain "Hello World"

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>HTML Mastery Challenge</title>
  </head>
  <body>
    <h1>HTML Mastery Challenge</h1>

    <!-- Write your code below -->

    <div>
      <h2>Shopping List</h2>
      <ol>
      <li>carrots</li>
      <li>apples</li>
      <li>bread</li>
      </ol>
    </div>
    <p><strong>Things to buy</strong></p>
    <form action="#" method="POST" name="my_form">
      <input type="text" name"username"><br>
      <input type="password" name"password"><br>


      <textarea name="essay" row="10" cols="30"></textarea><br>
      <input type="submit"value="Hello World">
  </body>
</html>

do like that

  <!DOCTYPE html>
<html>
  <head>
    <title>HTML Mastery Challenge</title>
  </head>
  <body>
    <h1>HTML Mastery Challenge</h1>

    <!-- Write your code below -->
   <div>
     <h2>Shopping List</h2>
     <ol>
       <li>Apple</li>
       <li>Mango</li>
       <li>Banana</li>
     </ol>
     <p>Just do <strong>that</strong></p>
     <form>
       <input type="text" value="Hello World">
       <input type="submit">
     </form>
   </div>

  </body>
</html>

1 Answer

Daniel Gauthier
Daniel Gauthier
15,000 Points

Hey Elizabeth,

Taking a look at your code, there are three issues that will cause problems.

The first issue is that you didn't include the = sign after the name attribute in the first two input elements in your form.

The second issue is that you didn't close your form tag with a closing form tag.

The third issue is that the challenge is asking you to set the text input to read "Hello World", which can be accomplished by adding a 'value' attribute to the input element with the type text, and assigning the value of the 'value' attribute to be "Hello World".

When completed, the result will look like Ashish Mehra's provided answer.

I just wanted to add some clarification about what appeared to be wrong in your answer.

Good luck!