Submitted almost 2 years ago
html5 and css3, in this project I used the basics of html5 and css3.
@carlosbarros723
Design comparison
SolutionDesign
Solution retrospective
hello, I would like some tips on how I can improve my css and some tips on how to name classes.
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.
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.
-
There is no need to enclose a link within a paragraph within a span, you are using more lines of code than necessary. All those elements have different semantic meaning.
Do:
<a href="#">Change</a></p>
Instead of:
<span class="plano__link"> <p> <a href="#">Change</a></p> </span>
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 π.
-
To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here π.
.contaner__base { /* width: 100%; */ /* height: 100%; */ min-height: 100vh; display: flex; flex-direction: column; justify-content: center; . . . } .contaner { /* margin: 60px auto; */ }
I hope you find it useful! π
Happy coding!
Marked as helpful0 - Use the
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