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 trialSean Flanagan
33,235 PointsWhat does # mean?
Hi guys and girls.
This may seem a ridiculous question, but I've only been a member of Treehouse for 3 days. What does # mean please?
Thanks
Sean
2 Answers
Gary Mead
1,165 PointsThe # is the id selector which is used to specify a style for a single, unique element.
Example: < div id="wrapper" > < /div >
And then on your .CSS file, apply formatting to that class:
"#wrapper { max-width: 940px; margin: 0 auto; padding: 0 5%; }"
Michael Austin
Courses Plus Student 7,814 PointsHi,
Itβs used in two areas, for IDs of tags and for colour palettes.
Tag IDs:
<div id=βmeβ>Hello</div>
#me{color:red}
Colour palettes: The # means that a hexadecimal colour reference will follow. For example #000 is black, #fff is white.
Have a look at this thread on StackOverflow, as it covers both the general and technical side of hexadecimal colours.
http://stackoverflow.com/questions/22239803/css-how-does-hexadecimal-color-work
Sean Flanagan
33,235 PointsHi Michael. Thanks for the link. I found it very helpful. :-)
Sean
Michael Austin
Courses Plus Student 7,814 PointsHi Sean,
Garyβs description is better for tag IDs as itβs related to the video (something I keep overlooking). Iβve covered two bases :)
Sean Flanagan
33,235 PointsFair enough. You've both been very helpful, in any case. :)
Sean Flanagan
33,235 PointsSean Flanagan
33,235 PointsThanks Gary. :-)