Design comparison
Solution retrospective
Built with. 🔨
- HTML.
- Tailwind.
- Vite.
New Things Learned. 🎓
-
Using
@apply
to add utility classes to my custom classes defined inside thestyles.css
file.@layer base { *:focus-visible { @apply outline-[0.125rem] outline-dotted outline-primary-400 outline-offset-[0.125rem]; } }
Ending Notes. 📝
- After my previous project, which was my first Tailwind project, I wanted to do another small component project using Tailwind to become more familiar with it.
- The padding between the edges of the container and the content were different in mobile screens and desktop screens. I got the result using a
clamp()
, so I could skip having a media query only for that value.@layer utilities { .p-clamped { padding: clamp(1.5rem, 5vw, 2.5rem); } }
Would love some overall feedback on any areas where I can improve.
Community feedback
- @krushnasinnarkarPosted 4 months ago
Hi @DarkstarXDD,
Congratulations on successfully completing the challenge! Your code is well-structured, and the website works beautifully across different screens. You've done an excellent job ensuring responsiveness and functionality.
Your HTML structure is quite good, but it can be enhanced by using more semantic tags and ensuring proper accessibility. Here are some improvements:
- Use
<header>
for the profile header. - Use
<section>
for grouping related content (profile header and description). - Use
<nav>
for the links, as they are navigational elements.
You can check W3Schools Semantic Elements to learn more about semantic elements and improve your HTML structure.
I hope you find this helpful, and I would greatly appreciate it if you could mark my comment as helpful if it was.
Feel free to reach out if you have more questions or need further assistance.
Happy coding!
0@DarkstarXDDPosted 4 months ago@krushnasinnarkar
Thanks, but I don't think any of the mentioned points are valid for this component.
<header>
should be used for content that is repeating across multiple pages. This is a component, which doesn't need a<header>
. banner landmark<section>
is a meaningless element just like a<div>
unless you have labeled it. So no need to replace a<div>
with a<section>
unless you prefer it.<nav>
is used to navigate the content inside the site. Not for external links. Having the links as list items is enough in this case. navigation landmark
1 - Use
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord