Building a Simple Profile Card with Nested Elements
📖 Scenario: You want to create a simple profile card on a webpage that shows a person's name, a short description, and a profile picture. To organize this information clearly, you will use nested HTML elements.
🎯 Goal: Build a profile card using nested HTML elements including a section as the container, a header for the name, a p for the description, and an img for the profile picture inside the section.
📋 What You'll Learn
Use a
section element with the class profile-card as the main container.Inside the
section, add a header element containing the person's name.Add a
p element inside the section for the description text.Include an
img element inside the section for the profile picture with alt text for accessibility.💡 Why This Matters
🌍 Real World
Profile cards are common on websites to show user or team member information in a clear, organized way.
💼 Career
Understanding how to nest HTML elements properly is essential for building accessible and well-structured web pages.
Progress0 / 4 steps