3
The question is very simple and objective, I want to have a font style for the paragraph and another font style for the quotes, but when I put the content between the tag <q>
what’s inside takes the font-family
of <q>
and loses the font-family of <p>
.
For clarity see the example.
p {
font-size: 32px;
font-family: serif;
}
q {
font-family: sans-serif;
}
<p>Lorem ipsum dolor sit amet consectetur, <q>adipisicing elit</q>. Ipsum, quas.</p>
The part of the text that is involved by the tags <q>
gets the different font-family than the <p>
, but I just want the quotes and not the whole text inside the tag
I don’t want to use quotation marks on the body of the text, it has to be with the tag <q>
, That would have no value ok ... "texto" ...
How can I solve this problem semantically using the tag <q>
and in a way that I can reuse in other parts of the text?
I do not know what this has to do with semantics and I honestly found it difficult to understand the statement ... but I suppose you want this
q { quotes: "«" "»" "‹" "›"; }
(is just an example), I understood right?– Guilherme Nascimento
@Guillhermenascimento In fact it is that theoretically ta
<q> seria a tag para quote correto?
For the screen reader to understand that is in quotes and not use "text" and yes <q>text</q> understands. I think I may have expressed myself badly, what I mean is that it would be mandatory to use the tag<q>
to put the contents inside. And it has more to do with the font-family and not with the quote type.– hugocsl
There is no way to say that a screen reader will recognize
<q>
or"
or'
, this is speculation, there are different screen readers, with varied functionalities, support or lack of support for certain HTML tags. I could "assume" that a good screen reader recognizes all (<q>
,"
,'
), because the idea is to actually read the text and not every dev is a good dev to understand the needs of visually impaired people.– Guilherme Nascimento
@Guilhermenascimento is a very interesting point of view! Until pq some readers are paid, and sometimes those who do not want to buy the newer version that support the newer things can become subject to this kind of "detail".... (not that tagged
<q>
be new)– hugocsl