@Harsh-Kumar-Dwivedi
Posted
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 !
Hi @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?
@Harsh-Kumar-Dwivedi
Posted
@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 helpful