Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 2.28 KB

File metadata and controls

75 lines (48 loc) · 2.28 KB

Frontend Mentor - Newsletter sign-up form with success message solution

This is a solution to the Newsletter sign-up form with success message challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • Add their email and submit the form
  • See a success message with their email after successfully submitting the form
  • See form validation messages if:
    • The field is left empty
    • The email address is not formatted correctly
  • 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

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow

What I learned

  • The email field is validated using native HTML5 validation.

  • Error messages are displayed using the validationMessage property.

  • Form data is collected using the FormData interface.

  • Data validation and saving are performed in JavaScript.

  • Uses CSS pseudo-classes like :invalid and :valid to provide visual feedback to the user.

Continued development

  • Data Storage: Send form data to a backend server using RESTful APIs for database storage.

  • User Authentication: Implement user login and registration to personalize the experience and store emails securely.

Author