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

CSS Enhancing Design with CSS Styling Boxes Adding Content Using CSS

Why add the symbol entities to CSS and not HTML? I found that you can add the symbol entities to HTML.

I did some research and found that you can add symbol entities to HTMl. Please see the link below for reference:

https://www.w3schools.com/html/html_symbols.asp

1 Answer

Anwar Montasir
STAFF
Anwar Montasir
Treehouse Teacher

Hi Jonathan, that's correct. You can use symbol entities in HTML, and often you will actually want to.

For example, based on the example in the link you posted, you might be telling the user that an item for sale costs 6 Euro.

<p>Your cost is &euro;6</p>

And that should print the Euro symbol in the browser. In that case including the symbol entity in your HTML makes sense, since the Euro symbol is part of the page content. You're communicating to the user that the cost is €6.

However, if the symbol is purely decorative, you have the option of including it in your CSS, as I've done here. In my sample the down arrow doesn't really add anything to the meaning of the page, it's just a visual decoration to draw attention downward.

Thanks for the clarification!