Design comparison
Community feedback
- @rayaattaPosted 10 months ago
Hi Ahmed Salamaπ, congratulations on completing your first FED challenge π
I have some suggestions you might find useful.
1 I noticed
<h2>
in your code.since it is the only heading in the document you should replace it with<h1>
.Here's a quick guide on how to use them:
The
<h1>
to<h6>
tags are used to define HTML headings.<h1>
defines the most important heading.<h6>
defines the least important heading. Only use one<h1>
per page - this should represent the main heading/subject for the whole page. Also, do not skip heading levels - start with<h1>
, then use<h2>
, and so on. You can then style them in you css.Unlike what most people think, it's not just about the size and weight of the text It is about maintaining a clear and consistent hierarchy through out the document
2 Try to make your html more Semantic by wrapping the main page content inside a
<main>
tag . Replace<div class="card">
With<main class="card">
. This changes nothing visually but Using it makes all the difference. Using semantic markup improvesSEO
And user experience (accessibility) for people using assistive technology such as screen readers.
3 Change
height: 100vh;
on the body tomin-height:100vh;
This makes sure that content does not overflow on short devices or mobile devices in landscape mode.4) You used
width: 330px;
On the.card
This is okay but in case a screen is less than 330px wide then the card overflows the view port. You can make it more responsive by usingmax-width:min(90%,330px)
This means it is 330px but on smaller screens it only covers 90% of the width.5 remove
left:25px
from*
because it is offsetting your card from the centerI hope this helps π
Otherwise nice solution π
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