I have a CSS element configured to insert some content through:
.foo:after { content: "Bold, italics"; }
I would like the word "Bold" to be displayed in bold and the word "italic" to be displayed in italic style. I know that you can add lines:
font-weight: bold; font-style: italics;
But that will make both words bold and italic. If I could use the html elements inside the content field, I would add something like:
content: "<strong>Bold</strong>, <em>italics</em>"
But alas, this is not possible.
Is there any other way to achieve this effect? Ideally, without calling javascript and purely using html / css.
source share