Design comparison
Community feedback
- @rayaattaPosted 10 months ago
Hello πBharath,nice solution π.
I have some tips to improve your code.
1 Try to make your html more Semantic by wrapping the main page content inside a
<main>
tag . Replace<div class="card" role="main">
With<main class="card">
. This changes nothing visually but Using it is a better alternative to using the aria role when the element for it already exists. Using semantic markup improvesSEO
And user experience (accessibility) for people using assistive technology such as screen readers.
2 The alt tag for the avatar image should contain the name of the person on the image i.e
alt="Greg Hooper"
You can check out this article.3 I noticed that you used
h5
thenh4
.sinceh4
is supposed to be the top level heading in the document you should replace it with<h1>
. "Learning" is not a heading, it's more like a link- it could be a<a>
or just ap
Here's a quick guide on how to headings:
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
4 Remove the
<div class= "attribution">
from the main and change it to<footer class="attribution">
And wrap it's text inside ap
element. This improves accessibility and SEO since it is much more semantic.I hope this helps π Your solution looks awesome Happy coding βοΈ
0
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