Quoted string "…"
Quoted strings are used within lines of text to mark direct speech in fiction, titles of artistic works such as Michelangelo's David
, nicknames within names like Ronnie The Rocket
O'Sullivan and of course quotations.
The related quotation block markup can be used for longer and more complex quotations.
How to
Mark both the start and the end of a quoted string in your text with a quotation mark like in the examples below. Quoted strings are phrase markup, so the quotation marks which mark its start and end must be within the same block.
Note that you can have one quoted string nested inside another, if you put the inner quoted string into a bare string like in the second example.
Examples
He said "Just put your feet down, child."
He said Just put your feet down, child.
The next example has a quotation nested inside a quotation. The inner quotation is wrapped in backticks `…`
which mark a bare string. The bare string resolves the ambiguity where a quotation starts and ends.
And I said "What about `"Breakfast at Tiffany's"`?"
And I said What about
Breakfast at Tiffany's
?
For developers
When Aneamal is translated to HTML, a quoted string is turned into an HTML q element, so the examples become:
He said <q>Just put your feet down, child.</q>
And I said <q>What about <q>Breakfast at Tiffany's</q>?</q>
Browsers usually render the q element with a symbol at its beginning and end to indicate a quotation, but you can make this explicit with CSS.
You can even make browsers use different symbols for text in different languages, so that the quotation always meets the typographical conventions of each language or country. The following example sets standard symbols to use in general, symbols for German, for German in Switzerland, for English, Spanish, Swedish:
q {quotes: '"' '"' "'" "'"}
q:lang(de) {quotes: '„' '“' '‚' '‘'}
q:lang(de-ch) {quotes: '«' '»' '‹' '›'}
q:lang(en) {quotes: '“' '”' '‘' '’'}
q:lang(es) {quotes: '«' '»' '“' '”'}
q:lang(sv) {quotes: '”' '”' '’' '’'}
In each line, four symbols are set: the opening and closing symbols for a quotation and the opening and closing symbols for a nested quotation.