Contact Form
Building accessible forms is a crucial task for front-end developers. This challenge will help you practice building a form with several input types and validation.
Frontend Mentor - Contact form solution
This is a solution to the Contact form challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Table of contents
Note: Delete this note and update the table of contents based on what sections you keep.
Overview
The challenge
Users should be able to:
- Complete the form and see a success toast message upon successful submission
- Receive form validation messages if:
- A required field has been missed
- The email address is not formatted correctly
- Complete the form only using their keyboard
- Have inputs, error messages, and the success message announced on their screen reader
- View the optimal layout for the interface depending on their device’s screen size
- See hover and focus states for all interactive elements on the page
My process
Built with
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
What I learned
I mostly learned how to style forms further, along with validation via JavaScript. I had done a smaller version of this before, but this was a bit more complicated as this had several elements to manage.
Continued development
I find that I struggle to remember how to style form elements often. With how common this seems to be I feel as though I should take some notes to refer to, as I find myself going back and having to research how to style certain elements repeatedly.
Comments
Loading comments…
By commenting, you agree to the Terms of Service. The Privacy Policy explains what’s stored.