It's amazing when you work for many many years with a technology and stumble upon something new. I stumbled upon an HTML tag that I had never used before, the Q tag.
With the Q tag, you can quote some text inside a paragraph without breaking the line. The browser is supposed to render that text in quotes, so you don't have to add them yourself.
Let's see it in action:
<p>Quoting with the Q tag is <q>sweet</q>.</p>
The above HTML snippet will render like this:
Quoting with the Q tag is sweet
.
And with CSS you can style just the Q tag, making for example all of your quoted text also bold or italics. Of course you could do the same thing by misusing some span or em tag, possibly with a separate CSS class name, but I think this approach is cleaner and more semantic friendly.
Hope this helps.
94ee1d19-d278-4589-a652-7d74c704f9d6|0|.0|da4d7cd2-c57c-4016-8c82-802ec35f5887
Categories: