Design comparison
Solution retrospective
I'm a little rusty, it's been a while, and I'm trying to get back to it. I put the code through the w3 html and css validator, so on that front it should be ok. When I pressed 'tab' it went through the register button and the social media icons.
One question I had is if using <a> vs <button> is better in this example.
If there's any general feedback after looking at the site and/or the code, especially with layout and spacing, I would appreciate it.
Thank you and Cheers✌️✌️
Community feedback
- @imadvvPosted about 2 years ago
Greetings Nour Al-Osman!! Congratulations on completing Your 3rd challenge!, 👏👏👏. well done.
I take a look at your code and have some general suggestion for you, Hope you found it useful.
I don't know if you know this but when You're using
flex
you have access to thegap
Property, which let you add spacing between rows or columns very easy, so can add a spacing to social media icons just like so.social-icons { gap : 1rem;}
, and also for thebutton
or actually on general when You have a:hover
style on interactive element also include:focus
to it, that for the keyboard users when they are navigate with the tap and focusing over that element the styles that apply onhover
will apply on focus too, something like this.reg-btn:hover , .reg-btn:focus {...}
,and for your question this is document form a11y-101 has an excellent explanation to this question , but the simple rule is to use
<a>
for Links and navigation between Pages/Views, and<button type="">
for actions that have a function to handle it.this page for example the
social-media
should be a<a>
tag because they are link to asocial media pages
and<button>
forreg-btn
because normally they are a function that will run when user click to register." I try my best on this, please correct me if am wrong, I'm on the learning process "
but over all, Happy Codding Rusty Man, Have a Good Day/Night
Marked as helpful1@nalosmanPosted about 2 years ago@imadbg01 Hi, thanks for the feedback! I appreciate it! Went back and fixed some of the spacing and width issues.
0
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