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

jadaml
11,593 PointsSet that text input to contain "Hello World"
I guess I'm not sure how to add the text of "Hello World" into my text input. I tried using the placeholder attribute (correct term?)
Even after going back to the videos I didn't find Nick ever putting in text via the html file.
<!-- Write your code below -->
<div>
<h2>Shopping List</h2>
<ol>
<li></li>
<li></li>
<li></li>
</ol>
</div>
<p><strong>Hello World</strong></p>
<form>
<fieldset>
<legend>Hello World</legend>
<input type="text" name="Hello World" placeholder="Hello World">
</fieldset>
</form>

Jill Marcum
16,088 PointsThat's funny...so did I! I think they should change it... "!" is the standard.

James Barnett
39,199 PointsTraditionally it's always been Hello, world!
source: https://en.wikipedia.org/wiki/List_of_Hello_world_program_examples

Kat Stacy
41,658 PointsYou need to change the placeholder attribute to the value attribute. Whatever the value of the value attribute is will be displayed in the text input element.
19 Answers

James Barnett
39,199 PointsThe value
attribute for an input field is the text that's displayed whereas the placeholder
attribute is an HTML5 feature, that shows text in an input box only until the user starts typing.

Seif Eldein Sayed
3,508 Points <input type="text" name="Hello World" value="Hello World">
This right?

George Dinmore
518 PointsYes, that is right, thanks!

Terence Mclaren
1,092 Points@James, I am completing the HTML mastery tasks as well and the videos do not explain the value attribute in this context.

jadaml
11,593 PointsWhen I put it in that way it says I failed the code challenge.
The code challenge is to: Set that text input to contain "Hello World"
So they are asking me to have the text "Hello World" be populated in my text field is what I gather. Though they did not cover that in the video, and placeholder is the only way I knew how to do it otherwise. So I'm not really sure what it is they want me to do or how to do it.

jadaml
11,593 PointsSolved: It was the "value" attribute that they were looking for.

Denny Wetmore
943 PointsValue wasn't covered at all in the training...

Graham Smiley
Courses Plus Student 1,632 PointsActually it was covered, just not in the form of a text field. It wasn't well explained but on the lesson for creating a "submit" button nick used the value attribute to make the submit button say "continue". But i agree it wasn't obvious that you could use the same attribute to populate a text input the same way.

mason choi
2,462 PointsI was stuck in here????But I have solved the problem. <form action="#" method="POST" name="my_form"> <input type="text" name="username" value="Hello World"> </form>

mason choi
2,462 Points<form action="#" method="POST" name="my_form"> <input type="text" name="username" value="Hello World"> </form>

Cristiane Marques
1,780 PointsI can't see to get this right. Could someone please help me? Thanks!

James Barnett
39,199 PointsCristiane Marques - Post what code you've got so.

Seif Eldein Sayed
3,508 Points<input type="text" name="Hello World" value="Hello World">
I always do it that way. Try it out and let me know.

Seif Eldein Sayed
3,508 PointsCan you send me a link to the challenge, I'll take a look myself.

Seif Eldein Sayed
3,508 PointsYeah, I can't seem to write html here. I've already written that but it doesn't show up :/

Joseph Finkenbinder
5,340 PointsI'm unable to get past this 'value' issue. I have: <input type="text" name="Hello World" value="Hell World">
and I'm not passing the code challenge.
Ideas? BTW, the code I post doesn't show in the post. How do you do that?

James Barnett
39,199 Pointsthe code I post doesn't show in the post. How do you do that?
Check out this post on how to type code in the forum

Joseph Finkenbinder
5,340 Points''' thanks '''
Chris Lovelace
2,289 PointsMake sure your hello wold is "Hello World" the submission is case sensitive.

mason choi
2,462 Points<form action="#" method="POST" name="my_form"> <input type="text" name="username" value="Hello World"> </form>

Cristiane Marques
1,780 PointsJames Barnett - Thanks for your help!!!
I got it right, but on the previous exercise where it asked to write an input type "text", I went ahead and completed with name and username. So, as a result when entering the right code for the last exercise (text/value) it kept catching on the (name and username) on the above line and overriding the actual line. I sent a message to the Support Team asking if they could implement the challenge section with some sort of (highlighted hint) that could show us where exactly is the error.
Thanks again for your help!

Li Chang
11,883 PointsMaybe you can change placeholder="Hello World" to value="Hello World"

rowellcarloscanlas
2,500 Pointsit should be just <input type="text" value="Hello World"> just removed the name="Hello world" on your code
Joe Marion
5,112 PointsJoe Marion
5,112 PointsI spent forever on this one.. because I read 'Hello World!' not 'Hello World'