Design comparison
Solution retrospective
All feedback is welcome!
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @tdreams ๐, good job on completing this challenge! ๐
I have some suggestions you might consider to improve your code:
- Use the
<main>
tag to wrap all the main content in your solution instead of using<div class="card">
.
- Instead of using pixels in font size, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference.
- The
<span class="button">
element should be ananchor
tag and not a simplespan
.
- The music icon and the hero illustration are for decoration purposes only, so they could be hidden from screen readers by adding aria-hidden="true" and leaving its alt attribute empty:
<img src="images/icon-music.svg" alt aria-hidden="true" class="music">
I hope those tips will help you! ๐
Good job, and happy coding! ๐
Marked as helpful1 - Use the
- @AdrianoEscarabotePosted about 2 years ago
Hi Fab, how are you?
I really liked the result of your project, but I have some tips that I think you will enjoy:
-
every Html document must contain the main tag, so we can identify the main content, to fix this, wrap all the content with the main tag. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
-
Consider using rem for font size .If your web content font sizes are set in absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. Relative units โstretchโ according to the screen size and/or userโs preferred font size, and work on a large range of devices.
if you want to continue coding with px, you can download a very useful extension in vscode, it converts px to rem! link -> px to rem
To prevent the background image from breaking at higher resolutions, we can prevent this in two different ways:
-
Add a
background-repeat: repeat-x;
, the image will repeat on the horizontal axis, preventing it from breaking. -
Add a
background-size: 100% 50vmin;
, the50vmin
will set its height as the page target, and100%
will make it stretch on the horizontal axis.
Feel free to choose one of the two!
The rest is great!
I hope it helps... ๐
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