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
Brent Boles
1,738 Pointshtml mastery task 7 of 8
Asking me to "Set that text input to contain "Hello World"" Not exactly sure what they want. Any help is appreciated, thanks.
6 Answers
Ross King
20,704 PointsHi Brent,
Below is the answer. The text input is assigning a value to the form input.
Hope this helps!
<!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></li>
<li></li>
<li></li>
</ol>
<p>Add a paragraph tag that has some text inside of it <strong>bolded</strong></p>
</div>
<form action="#">
<input type="text" value="Hello World"> <!--Set that text input to contain "Hello World"-->
</form>
</body> </html>
Mark Dohnt
13,275 Points<form> <input type="text" value="Hello World"> </form>
For "text", "password", and "hidden" - it defines the initial (default) value of the input field.
Gary Mann
8,639 PointsThey're looking for you to set it up so that the input text box has the words "Hello World" in it before the user inputs anything.
An attribute you might use to accomplish a similar effect that isn't covered here: placeholder attribute: w3schools.org
tetay liu
Courses Plus Student 5,975 Pointsthe input tag has many type ,such as type="text",type="hidden",type="password",maybe you can try it and sometimes when you set a input tag ,you also have to give it a value, so you will see the input tag and got a value called "hello world"
James Barnett
39,199 PointsYou are probably look for the value attribute. The placeholder attribute does something similar.
James McGuire
3,272 PointsHere is the answer for 7 of 8. under <form> <input type="text"name="Hello World" value="Hello World"> </form>
Gary Lange
2,774 PointsGary Lange
2,774 PointsThanks for this—I couldn't figure out exactly what they wanted either. I kept throwing more and more code at it, got frustrated, came here and....duh. Simple. Thanks again.