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 trialpaulscanlon
Courses Plus Student 26,735 PointsAbout reserved characters
Hey guys
Do we seriously need to replace every question mark, apostrophe and exclamation mark in the whole HTML document with ! © etc etc etc?
Would that not be ridiculously tedious? What are the downsides if we don't? (sorry don't)? ;-)
Thanks in advance
Paul
3 Answers
Ezra Siton
12,644 PointsNo. But if you want to print reserved characters like "<div>" you must use this idea.
This is ok:
<p>
I love "treehouse"
</p>
For example, you can write bullet character by "copy-paste" • or by • • (but again when you write code you not always wants to search for this in google and copy-paste so you can use this &bull and that's it.
paulscanlon
Courses Plus Student 26,735 PointsThink i got it, thanks
Callum Anderson
8,837 PointsMy understanding is that < or > must always be replaced by < and > - otherwise the browser will interpret them as tags.
Also mentioned in the video was & being replaced by & as best practice, and to insert an additional space (double spaces or above are truncated into a single space by the browser).
I guess that there will be other uses when mixing with other technologies such as Javascript.