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

Text input html code

Set that text input to contain "Hello World".

6 Answers

James Barnett
James Barnett
39,199 Points

Try using the value attribute.

James Barnett
James Barnett
39,199 Points

@Chris Frees -

Nope, set the input to have a value not a placeholder.

Also remember our goal here is to give help not answers

Well he was pretty vague with the question.

James Barnett
James Barnett
39,199 Points

@Chris Frees -

> Well he was pretty vague with the question.

I certainly agree with you there.

help

Wayne Priestley
Wayne Priestley
19,579 Points

You need to be a little more specific. Set the H1 text? or paragraph text?

Maybe mention where in the course you are stuck.

Yes I got. Thanks everyone

Hello I've the same problem with Challenge task 7 of 8 from HTML->Forms.

"Set that text input to contain "Hello World".

Bummer! Try setting the 'value' attribute on the text input."

My code looks like that

<body>
    <h1>HTML Mastery Challenge</h1>

    <!-- Write your code below -->
    <div>
      <h2>Shopping List</h2>
      <ol>
        <li>Item></li>
        <li>Item></li>
        <li>Item></li>
      </ol>
      <p><strong>Text</strong></p>
      <form>
      <input type="text" name="username">
      <input type="submit" value="Hello World">
    </form>
    </div>


  </body>
</html>

I tried also to enter this code:

<input type="text" name="Hello World" value="Hello World">

Or

<input type="text" value="Hello World">