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 trialJohnny Garces
Courses Plus Student 8,551 Pointssurprised there was no mention of monospace typefaces
I see monospace in many websites today. Is monospace serif/sans-serif or a typeface genre on its own?
2 Answers
Steven Parker
231,184 PointsThe generic font family names include "monospace" as a unique setting like "serif" and "sans-serif".
If you want both monospace and serif, or monospace and sans, you'd need to set a specific font instead of the generic.
For more details, see the MDN page on font-family.
Johnny Garces
Courses Plus Student 8,551 Pointsthanks, Steven- that sounds right. I've also just stumbled upon the analogy that fonts are like mp3 files whereas typefaces are like the song in itself. So you'd say "I like this song" rather than "I like this mp3 file" (the mp3 file being the font)...
Steven Parker
231,184 PointsJohnny Garces — Good example. And you can mark a question solved by choosing a "best answer".
And happy coding!
Johnny Garces
Courses Plus Student 8,551 PointsJohnny Garces
Courses Plus Student 8,551 Pointsso is monospace a typeface, just like serif, sans-serif, and script are? I'm not concerned about how to access it in CSS, just wanted to know if Monospace is a font, a typeface, or a subgenre. I see how prevalent Monospace is in websites. I believe it is, given the many sub-genres that fall under it. thank you!
Steven Parker
231,184 PointsSteven Parker
231,184 PointsThere could be a specific font named "monospace", but it's generally a generic type just like "serif" and "sans-serif".