HTML/CSS Assessment Question

Hey! I’m extremely new to coding so I apologize in advance if my question sounds novice or is worded slightly incorrect. I was just wondering, should I create a div with the div class “card” that includes all the html properties of everything that’s going to be included in the picture card, and then within that div include divs for “desert”, “profile”, and the included texts? Would this allow me to edit the details of the card as a whole while still being able to individually modify the appearance of the divs within the div class “card” with CSS?

1 Like

I think I figured it out. Hoping this looks kinda right.


Welcome to the community!

It looks like you’re on a roll! Jumping in and testing things out is the best way to learn, and it looks like you are doing just that!

To answer the original question, Yes. It is common to create a <div> with a particular class name and then include multiple elements within it. As you said, that can allow you to style elements together as a group.

1 Like

When there are 2 images how can we set CSS elements specific to one of the 2 images?