Newsletter sign-up form with success message

Solution retrospective
This is my solution for the Newsletter sign-up form with a success message I have used raw HTML, CSS, and Javascript Check out my solution and tell me if there is something that I can improve.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MelvinAguilar
Hello there 👋. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- Regex for email validation should not be limited to "@gmail.com" alone, as there are various email domains. Instead, use a more comprehensive regex pattern to validate emails.
- Separate JavaScript from CSS. Avoid modifying specific styles like borders directly in JavaScript, create a CSS class with the desired styles and use JavaScript to add or remove that class. This helps maintain a cleaner structure and makes it easier to manage styles.
- In your JavaScript code, you can use
textContent
instead ofinnerText
to set the text content of an element.
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Join 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