Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
<span> elements give you a way to logically separate inline content in the same way that <div>s allow you to create logical separation for block level content. To see how this works, we’re going to style the music recommendations by first adding <span> elements around the CDs and artists, and then we’ll write two CSS rules to style the <span>s. Here’s exactly what you’re going to do:
You’re going to nest the CDs and artists in separate <span> elements.
You’re going to add one <span> to the “cd” class and the other to the “artist” class.
You’re going to create a rule to style the “cd” class with italic, and the “artist” class with bold.