<!DOCTYPE html>
<html>
<head>
<style>
p::before {
content: url(w3css.gif);
}
span::before {
content: inherit;
</style>
</head>
<body>
<p>My name is <span id="firstname">Donald</span></p>
<p>I live in <span>Ducksburg</span></p>
</body>
</html>