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.
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
- Live Site URL: Click here
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- React - JS library
I get to learn about picture tag and how to use it, use new CSS media query syntax and useref hook to get the input value.
<picture>
<source
media="(max-width: 650px)"
srcSet="/illustration-sign-up-mobile.svg"
/>
<img
src="illustration-sign-up-desktop.svg"
alt="illustration of sign up"
/>
</picture>
@media (width <= 650px) {
body {
display: block;
}
}
- Picture tag - This helped me for picture tag.
- Media Query Syntax - This is an amazing article which helped me finally understand the new media query syntax. I'd recommend it to anyone still learning this concept.
- Frontend Mentor - @subhajitroycode
- Twitter - @subhajitroycode
- LinkedIn - @subhajitroycode