What does it mean to nest elements?



Step 1 of this exercise says: “always add two spaces of indentation when you nest elements inside of <div>s.” What does it mean to nest elements?


Take a look at the code snippet demonstrated in this exercise. Notice how the entire <span> element is contained within the <p> tags? We say that the <span> element is nested within the <p> element. Similarly, the<p> element is nested with the <div> element. For a review of nesting, run through exercise 4 of this lesson again.

FAQ: Learn HTML Elements – Intro to HTML – Displaying Text
I don't understand the purpose of attributes in general

3 posts were split to a new topic: Use or the benefit of the <span> element