Changing the text before the tags to be inside a span element