treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Best way to handle quotes and non-quotes

  • I know I'm suppose to wrap quotes in either a
    <q></q>
    or
    <blockquote></blockquote>
    , but what about non-quotes? You know... words that sort of still demands the quotation marks.

    Example:
    We went to see the sculpture "Friendship" by Robert Jacobsen.

    Should the word Friendship be wrapped in quotation tags, or is it okay to just use a " ?

    The reason I'm in doubt, is that I don't know if quotation tags are only meant for, well... quotes!??
  • Simply use ""

    Or if you want to be super keen on validation, use &quot;
  • well if you wnat to show something as a quote, as Doc said &quot; is best to use.

    but as for when you use them, is up to you and "your grammer"
  • Strictly speaking <blockquote> is a block element and <q> is an inline element. This means <blockquote> is automatically on a new line whereas <q> is not.

    So for your example you could use:
    We went to see the sculpture <q>Friendship</q> by Robert Jacobsen.
    We went to see the sculpture &ldquo;Friendship&rdquo; by Robert Jacobsen.
    We went to see the sculpture &quot;Friendship&quot; by Robert Jacobsen.

    The <q></q> wraps the word Friendship in 'smart' quotation marks. i.e. We went to see the sculpture “Friendship” by Robert Jacobson.

    If you prefer not to use <q> you can get the same result by using &ldquo; and &rdquo; in your markup.

    Finally ,you can use &quot; which results in "Friendship". i.e. standard quotation marks.

    Hope that gives you a few options to try out.
    Dave