Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Build a Basic PHP Website (2018) Adding a Basic Form Setting Up the Initial Form

Ryan Schmelter
Ryan Schmelter
9,710 Points

Why would we need &rsquo to create an apostrophe inside of p tags?

I'm not sure why this is necessary.

1 Answer

Steven Parker
Steven Parker
210,472 Points

That's no ordinary apostrophe! That's a "curly" or "word processing" style fancy apostrophe. Using the character entity allows the browser to render it without the server having to store or transmit anything other than common ASCII characters. This eliminates any risk of it getting altered by some process along the way.

Ryan Schmelter
Ryan Schmelter
9,710 Points

I appreciate the response Steven. Why exactly is this necessary though. It's not like that part of the text is getting submitted in the form. Thanks!

Steven Parker
Steven Parker
210,472 Points

No, but it is stored at the server, and then transmitted from the server to the browser to be displayed.

Steven Parker
Steven Parker
210,472 Points

Ryan Schmelter — Did that resolve your issue? You can mark a question solved by choosing a "best answer".
And happy coding!