In CSS, can I add text of a different style before or after other text?

css

Solution

span:after {
  content: "bar";
  font-style: italic;
}

It is however CSS3 and not widely supported (yet). See 4.2. Inserting content into an element: the '::before' and '::after' pseudo-elements.

Problem

For example, if the following is part of an HTML file: ``` <span>foo</span> ``` can I somehow add " bar" after it in italics with the `:after` and `:before` pseudo-elements in CSS so that it would say "foo bar"?

Original source