Design comparison
Community feedback
- @Harsh-Kumar-DwivediPosted 7 months ago
Hi @mbattaloglu,
Nice Solution !
I would suggest following:-
1.Prefer replacing
<div class="root">
with<main>
element.2.
<div class="card">
is redundant.3.Prefer replacing
<h2>
with<h1>
.These will enhance your code, improve accessibility and make your markup more semantic.
Hope these suggestions are helpful !
Stay Happy & Healthy !
Happy Coding !
0@mbattalogluPosted 7 months agoHi @Harsh-Kumar-Dwivedi !
Thanks for your nice and clear suggestions. I will make the changes asap. I always "forget" using
<main>
The only thing I didn't understand is, why is
<div class="card">
is redundant? What can be done instead of that?1@Harsh-Kumar-DwivediPosted 7 months ago@mbattaloglu
Welcome !
Thanks for your appreciation.
Since, you already have
<div class="root">
as a container for your card and then there is inside one extra<div class="card">
which is not needed. Also, you can consider body as the available space you have and inside that you have a card, therefore, for the card you would only need one container to have all elements of the card inside it. Therefore, I had said in my comment that it is redundant. I think it would clear your query.Hope my suggestions were helpful !
Happy Coding !
Marked as helpful0
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