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 HTML Basics Going Further with HTML HTML Entities and Reserved Characters

About 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
Ezra Siton
12,644 Points

No. 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 • &bullet; (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.

Think i got it, thanks

Callum Anderson
Callum Anderson
8,837 Points

My 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.