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 trialMichael L
2,482 PointsWhy does var message have "<p>" and "</p>"?
Not really sure why var message has "< p >" and "< / p >" inside quotation marks?? Do we want the program to not create a paragraph but to print "< p >"? kind of got lost in this line - can you please clarify?
Thanks in advance!
P.S. I am referring to Dave's solution code to the challenge, var message line.
3 Answers
Michael L
2,482 PointsThank you Russ - still seems to work - those "< p >"s confused me...
Russ Fleharty
Python Web Development Techdegree Student 10,815 PointsYou don't actually have to use "<p>" and "</p>". It's more for aesthetics in my opinion. Try deleting them and see how the text changes.
Lewis Cowles
74,902 Pointsbecause var message is being used to store a string with HTML in it so that when it is written to DOM (directly or indirectly), it has a container HTML Element I would assume
Michael L
2,482 PointsMichael L
2,482 Pointshad to put spaces in < p > b/c otherwise they disappear... :)