Semantic HTML5 markup and mobile-first workflow
Design comparison
Solution retrospective
Hello everyone, this is my first challenge. I found it to be relatively simple. The code is very short and I would appreciate any comments you may have on best practice or otherwise. Thank you for your time.
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
You have written the link to the Github repository incorrectly.
HTML π:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- Use the
<footer>
tag to wrap the footer of the page instead of the<div class="footer">
. The<footer>
element contains information about the author of the page, the copyright, and other legal information.
- The text
Improve Your Front-End Skills by Building Projects
is considered a heading element (h1).
Alt text π·:
- The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
-
The
alt
attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a betteralt
attribute would beQR code to frontendmentor.io
If you want to learn more about the
alt
attribute, you can read this article. π.
CSS π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here π.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0@hasanosman2020Posted almost 2 years ago@MelvinAguilar
Hello Melvin - many thanks for your helpful comments, particularly those with regards to accessibility. I do enjoy the topic of accessibility and, in light of your comments, I shall amend my solution to be more robust in that respect.
Very helpful indeed. Many thanks
0 - Use the
- @HassiaiPosted almost 2 years ago
Replace <div class="container"> with a main tag and wrap the heading in <h1> to fix the accessibility issue. click here for more on web-accessibility and semantic html
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0@hasanosman2020Posted almost 2 years ago@Hassiai
Hello Hassial - your comments are very helpful. Thank you for the links to the articles you mention - the information they contain is very useful. Thank you also for taking the time to review and respond to my solution. I shall edit and repost my solution taking your comments into consideration.
Many thanks for your time and effort. Thank you.
1
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