HTML and CSS Reference
In-Depth Information
Wait a sec…you removed
the double quotes and
substituted a < q > element, which just
displays double quotes? Am I supposed
to be impressed? Are you trying to
make things more complicated?
No. We're trying to make things
more structured and meaningful.
There are lots of reasons people use double quotes
in text, but when we use <q> , that means something
specific it means the text of an actual quote (in Tony's
case, a “remixed” quote).
See! Using double
quotes doesn't
make something an
actual quote.
In other words, what we've done is to add more
meaning by marking up the quote. Before we added
the <q> element, the browser just knew it had a
paragraph of text with a few double-quote characters
in it. Now, because we're using the <q> element, the
browser knows that some of that text is a real quote.
So what? Well, now that the browser knows this is a
quote, it can display it in the best way possible. Some
browsers will display double quotes around the text
and some won't; and in instances where browsers are
using non-English languages, other methods might be
used. And don't forget mobile devices, like cell phones,
or audio HTML browsers and screen readers for the
visually impaired. It's also useful in other situations,
such as a search engine that scours the Web looking for
web pages with quotes. Structure and meaning in your
pages are Good Things.
One of the best reasons (as you'll see when we get back
to presentation and CSS later in the topic) is that you'll
be able to style quotes to look just the way you want.
Suppose you want quoted text to be displayed in italics
and colored gray? If you've used the <q> element to
structure the quoted content in your web pages, you'll
be able to do just that.
Search WWH ::

Custom Search