HTML and CSS Reference
In-Depth Information
Q: So let me see if I have this right: I
use <q> when I just want to have some
quote in with the rest of my paragraph,
and I use <blockquote> when I have a
quote that I want to break out on its own
in my web page?
A: You've got it. In general you'll use
<blockquote> if you want to quote something
that was a paragraph or more, while you can
use <q> anytime you just want to throw in a
quote as part of your running text.
Q: Multiple paragraphs in a block
quote? How do I do that?
A: Easy. Just put paragraph elements
inside your <blockquote>, one for each
paragraph. Do try this at home.
Q: How do I know what my quotes
or block quotes will look like in other
browsers? It sounds like they may handle
it differently.
A: Yes. Welcome to the World Wide Web.
You don't really know what your quotes will
look like without trying them out in different
browsers. Some browsers use double quotes,
some use italics, and some use nothing at
all. The only way to really determine how
they'll look is to style them yourself, and we'll
certainly be doing that later.
Q: I get that the <blockquote> element
breaks its text out into a little block of
its own and indents it, so why isn't the
<blockquote> inside the paragraph, just
like the <q> element is?
A: Because the <blockquote> really is like
a new paragraph. Think about this as if you
were typing it into a word processor. When
you finish one paragraph, you hit the Return
key twice and start a new paragraph. To type
a block quote, you'd do the same thing and
indent the quote. Put this in the back of your
mind for a moment; it's an important point
and we're going to come back to it in a sec.
Q: You said that we can style these
elements with CSS, so if I want to make
the text in my <q> element italics and
gray, I can do that with CSS. But couldn't
I just use the <em> element to italicize my
A: Well, you could, but it wouldn't be
the right way to do it, because you'd be
using the <em> element for its effect on the
display rather than because you're really
writing emphasized text. If the person you
were quoting really did emphasize a word, or
you want to add emphasis to make a strong
point about the quote, then go right ahead
and use the <em> element inside your quote.
But don't do it simply for the italics. There
are easier and better ways to get the look
you want for your elements with CSS.
Also, remember that the indenting is
just the way some browsers display a
<blockquote>. Some browsers might not use
indentation for <blockquote>. So, don't rely
on a <blockquote> to look the same in all
Q: Can I combine quote elements?
For instance, could I use the <q> element
inside the <blockquote> element?
A: Sure. Just like you can put a <q>
element inside the <p> element, you can
put <q> inside <blockquote>. You might do
this if you're quoting someone who quoted
someone else. But a <blockquote> inside a
<q> doesn't really make sense, does it?
Search WWH ::

Custom Search