@VCarames
Posted
Hey there! 👋 Here are some suggestions to help improve your code:
- Along with a blank
alt tag
your “image” should also have aaria-hidden=“true”
to fully hide it from assistive technology.
More Info:📚
https://www.w3.org/WAI/tutorials/images/
- This challenges requires the use of two images 🎑 for different breakpoints. The
picture
element will facilitate this.
Here is an example of how it works: EXAMPLE
Syntax:
<picture>
<source media="(min-width: )" srcset="">
<img src="" alt="">
</picture>
More Info:📚
https://www.w3schools.com/html/html_images_picture.asp
- Never do this as it creates more issues than solve:
html {
/* 0.625*16px = 10px (1rem) */
font-size: 62.5%;
}
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding!🎄🎁
Marked as helpful
@leocsdev
Posted
@vcarames thank you. I've refactored my code based on the comments here. However, I've also read some articles about the font-size set to 62.5% in the html element. Can you tell me more about how it creates more issues? Also, is there any alternative to this solution or best practice to quickly calculate the sizes? I really appreciate any help you can provide.
@VCarames
Posted
@leocsdev
If you go to the FEM Slack and search font-size: 62.5%;
you find countless answers on why not to use it.
You will use rem
/ em
instead.