O
O
Oleg Torbasov2010-11-02 09:28:41
HTML
Oleg Torbasov, 2010-11-02 09:28:41

Semantic HTML layout of a multi-line quote?

A question for the adherents of semantic HTML markup.
How should a multiline quote be typed? It is clear that the blockquote tag, but here I see a difficulty in a very common case, when in the last paragraph after the end of the quote there is some other text: usually this is an indication of the source in brackets, a footnote, or even a banal point outside the quote. What to do with such text?
On the one hand, it is not part of the quote, so it has nothing to do inside the blockquote tag. On the other hand, it is part of the last paragraph of those grouped in the same tag.
It gets really bad if you use quotes with CSS; then they capture that text as well, which is completely wrong. You can, of course, trick it by wrapping this tag in a span, which is given absolute positioning and a small indent on the left; then it will fall out of context and go after the final quote. But this has all sorts of undesirable side effects: the appearance of a scroll bar in certain situations, copying that does not correspond to the apparent order of the text ...
In general, I want a solution that is both semantically correct and looks correct - or at least reasons why this is impossible.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
MikhailEdoshin, 2010-11-02
@MikhailEdoshin

Semantic layout is a myth. A simple example is you want to highlight a word. In the "semantic" layout, there is a "semantic" tag for this <em>, which is usually printed in italics. But in your phrase, this word is followed by, for example, a semicolon. According to typographic rules, the semicolon should also be italicized. Options: 1) leave the semicolon as it is, although this is wrong; or 2) put a semicolon inside the "semantic" tag, which is weird, or separate it with the same one <em>, which is even weirder; or, finally, 3) forget about “semantics” and type it up the right way.
The form of a message is its integral part; in general, a message cannot be divided into form and content. The medium is the message.

D
Delka, 2010-11-02
@Delka

Ready code posted above.
Attribution of the author is also part of the quote, you don’t publish a quote without attribution. This is cite.
We place quotes through q.

D
Delka, 2010-11-04
@Delka

ok, but how then to call the block "excerpt from the text + indication of the source"?
about cite- I remember somewhere recently I was just reading about these changes, I think this is stupid. but html5 is still a working draft, let's see what happens next.
the code is valid:
* clip2net.com/clip/m20050/1288856845-clip-131kb.png
* clip2net.com/clip/m20050/1288856999-clip-144kb.png
if the quote takes several paragraphs, replace qwith div, you can add it inside pto taste.

T
tick, 2010-11-04
@tick

>if the quote spans several paragraphs, replace q with p, you can add a div inside to taste.
corrected for more semantics.
and in general, as far as I remember, the q tag is intended for situations when it is necessary to highlight the part in the line that is a quote.
I would generally do this
div
blockquote
p text /p
p text /p
/blockquote
cite address /cite
/div

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question