Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Did you notice when you added the font-family property to your “p” selector that it also affected the font family of the elements inside the <p> element? Let’s take a closer look:
Just like you can inherit your blue eyes or brown hair from your parents, elements can inherit styles from their parents. In this case, the <a> and <em> elements inherited the fontfamily style from the <p> element, which is their parent element. It makes sense that changing your paragraph style would change the style of the elements in the paragraph, doesn’t it? After all, if it didn’t, you’d have to go in and add CSS rules for every inline element in every paragraph in your whole site... which would definitely be so NOT fun.