Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 7 months ago

Solution Newsletter sign-up form with success message

tailwind-css
Stefan Bojkovski•720
@xStephx
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Amit Dhakal•610
    @herojk64
    Posted 7 months ago

    good designing but bad structure for the form. first your tailwind configuration your loading though the CDN which is optional but learn to use node js and how to make your JavaScript more modular. Second you are listening to button click which is basically not ideal because the form is still submittable. what you want to do is include button inside the form and make the button type of submit and when you use JavaScript you listen to that form submit. advantages are you can get the values that are submitted through it without using any extra id for the input cause you only have one right now but in future if you have to work with many forms its a bad example. and instead of using two img with different screen break classes use picture will also default control that but its optional. happy coding.

    Marked as helpful
  • Gotyan•390
    @eduardoramirezrojas
    Posted 7 months ago

    Hi! I really liked your solution! However, I noticed a few areas where some adjustments could enhance the overall quality:

    Image Centering: The assets/images/illustration-sign-up-mobile.svg image is not centered on mobile devices. This affects the layout and user experience, so centering it would provide a more polished look.

    Use of <picture> Element: Instead of duplicating the <img> tag for responsive images, consider using the <picture> tag. This method is more efficient and can improve loading times. You can find more information about it here.

    Email Input Type: I noticed that you’re using a text input for the email field. Switching it to <input type="email"> would not only enhance form validation and improve accessibility but also allow the browser to autocomplete the user's email address, making it easier for them to fill out the form.

    Red Background: If the user enters an invalid email, consider using a setTimeout to make the red background disappear after a short period. This way, the user is alerted to the error without being distracted for too long.

    I’ve also created a similar solution, and I would love for you to take a look at my code and provide feedback. Overall, great work! With these adjustments, your project will be even more polished.

    Marked as helpful
  • Alex 🤸🏻‍♂️•1,710
    @sksksk2024
    Posted 7 months ago

    I also have a suggestion to improve your website, @xStephx! 📈🚀

    If you haven’t explored accessibility yet, it’s really important to make your site accessible for people with disabilities, such as visually impaired(👨🏼‍🦯) or hearing-impaired(🧏) individuals. Using alt attributes for images and aria-labels for interactive elements can make your site easier for everyone to navigate and understand. It’s a great way to broaden your audience and make the user experience inclusive!

    To check your site’s accessibility, try the WAVE extension (available for Firefox, Chrome, etc.). It’ll show you where improvements can be made. Feel free to reach out if you have any questions or need guidance! 😎👌🔥

    Thanks for supporting my work!🤩 And just out of curiosity—how do you get so many likes and appreciation on each challenge? 💀

    Marked as helpful
  • Rupak Mukherjee•1,370
    @hannibal1631
    Posted 7 months ago

    Hey, once again you nailed it with this one.

    Just one small suggestion, use setTimeout on the submit and reset button. Because when the submit and reset button are clicked, they work suddenly which looks choppy, so a small delay would looks good.

    Other than that, it's alright! alright! alright!

    Marked as helpful
  • Mohamed Ahmed•700
    @MohamedSharqawi
    Posted 5 months ago

    Very good, I learned a lot from your JS code

  • Muhammad Zariyan Asif•150
    @MuhammadZariyanAsif123
    Posted 7 months ago

    It's good but there are responsiveness issues in the layout.

  • Mudasir Nadeem•430
    @mudasirNadeem
    Posted 7 months ago

    good very good

  • Yamien Ariel•170
    @ariel172
    Posted 7 months ago

    You're too strong

  • collins-ai•450
    @collins-ai
    Posted 7 months ago

    This is nice, it looks great 👌. Your html and js code are very well structured and readable. I believe tailwind made your styling much more easy. I did the same challenge but my approach to solving it was different tho, you can check it out to see if I need any corrections if you like. Finally, I noticed that the subscribe button sticks to the bottom of the page on mobile device, is that ok?

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub