@vanzasetia
Posted
Hello there! 👋
You do not need to have visually <h1>
. This is only a component, not a full webpage.
If you want to have it then grab the styling from the following website.
How-to: Hide content - The A11Y Project
This is better than what @0xAbdulKhalid has recommended because it does not move the visually hidden element outside the viewport. This means, your website will not have an overflowing issue.
Here are some suggestions for improvements.
- Remove all
<div class="img">
and<div class="title">
elements. The spacing or the width of the elements inside the<section>
should be controlled with thepadding
of the<section>
. - Never use
px
unit for font sizes. Userem
orem
instead. Relative units such asrem
andem
can adapt when the users change the browser's font size setting. Learn more — Why you should never use px to set font-size in CSS
I hope this helps. Happy coding! 😄
Marked as helpful