Source Code:
(back to article)
Submit
Result:
Report an issue
<style> main :last-of-type { background-color: aqua; } </style> <main> <div> I'm the first div inside the main! <span>I'm a span here</span> And <span>I'm the other span in here!</span> </div> <div>Hi, this is the second div here! Now I have a <span>span</span> too.</div> <p>I'm a <u>paragraph</u> tag here! And I'm an <em>em</em> tag in p!</p> <p>Now I'm the last p!</p> <div>I'm the last div here, look at my color! But hey, I think I'm not the last now! There's a div next after me!</div> <div>Now I'm the last div!</div> </main>