Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Newsletter sign-up form with success message

ilkerโ€ข 150

@ilkerkarahan

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any feedback is welcome.

Community feedback

JoshBoluโ€ข 170

@JoshBolu

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

  • try adding another media query to take care of the display between media query width: 768px(max-width) and 540px(min-width)

Above all, the solution you submitted is great! Happy coding!

Marked as helpful

0
Petrit Nurediniโ€ข 2,860

@petritnuredini

Posted

Congratulations on finishing your project! ๐ŸŒŸ It's quite an accomplishment to complete a responsive newsletter sign-up form, and you've done a fantastic job integrating both design and functionality.

Here are some best practices and recommendations to further enhance your project:

  • Separate Concerns: Keep your CSS, HTML, and JavaScript separate. It's a good practice to link to external stylesheets and scripts rather than including them in your HTML file. This not only makes your code cleaner but also improves page load times because browsers can cache separate files more efficiently. ๐Ÿ‘“

  • Use Semantic HTML: Aim to use more semantic tags in your HTML. For instance, <main> should encapsulate the primary content of your webpage. Consider using <section> for the different parts of your content and <footer> for the attribution. ๐Ÿ“„

  • Responsive Images: Instead of hiding and showing different images for mobile and desktop, you can use the srcset attribute in the <img> tag to load the appropriate image size based on the screen width. This improves the loading time for your images. ๐Ÿ–ผ๏ธ

  • CSS Variables: Great job on using CSS variables; they make it much easier to maintain and change the styles. However, ensure that you use them consistently throughout your CSS. ๐ŸŽจ

  • Email Validation: Move your email validation logic into a separate function. This will make your code more readable and the function can be reused elsewhere if needed. ๐Ÿ“ง

  • Button Accessibility: Use a <button> tag instead of styling a <div> to look like a button. This ensures that your page is accessible to users who rely on screen readers and those who navigate using a keyboard. ๐Ÿ”˜

  • Error Handling: Provide real-time feedback when users are typing their email. You can use the input event to validate the email as the user types and show the error message accordingly. โš ๏ธ

  • Code Formatting: Consider using a linter or a code formatter like Prettier to automatically format your code according to a consistent style guide. This makes your code easier to read and maintain. ๐Ÿงน

References for further learning:

Keep coding and refining your skills. Every project you build takes you one step closer to mastering web development. Keep up the great work and happy coding! ๐Ÿ’ป๐Ÿš€

0

Please log in to post a comment

Log in with GitHub
Discord logo

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