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
Joshua Sommerfeld
5,697 PointsAre <q> tags always necessary for quotes?
Is it always necessary to use a <q> tag when using quotations marks within a paragraph?
For example: Is one of these more "correct" than the other?
<p>A wise man once said <q>I think, therefore I am.</q></p>
<p>A wise man once said "I think, therefore I am."</p>
Is the only reason you use the <q> tag so you can use CSS to style them more easily, or is there some other reason to be aware of?
Thanks
1 Answer
Kevin Korte
28,149 PointsI would say it would be good to use them on quotes. There are more than just CSS style reasons to use a particular tag. It's good for semantics. Search engine crawlers use the various types of tags you used to understand what your site is about and how to properly index it.
You could visually achieve a quote styling using divs, but that would tell the crawler that "hey, I have a quote here".
Joshua Sommerfeld
5,697 PointsJoshua Sommerfeld
5,697 PointsThanks Kevin. Big help! I'm definitely bookmarking the Mozilla Developer Network.
James Barnett
39,199 PointsJames Barnett
39,199 PointsI usually recommend of checking sitepoint reference and only going to MDN if I need more details as it can be dense reading sometimes.
Also HTML Dog is a great quick reference source.
Joshua Sommerfeld
5,697 PointsJoshua Sommerfeld
5,697 PointsBookmarked both. I love the quick reference sheets at HTML dog -- I'm always forgetting syntax and it's easy to see there. There are some nice little tutorials too. Thanks much.