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

FrontendMentor-RegisterPage-Responsive

@yLucino

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

Community feedback

Alex 3,130

@Alex-Archer-I

Posted

Hi! Cool work, congrats =)

Here are couple of tips =)

It's better to use label tag together with input. Label contains information about form field it associated with, therefore it's important for semantic and accessibility. Also for the list of features semantically correct will be to use ul tag.

Than I highly recommend you to learn about special JS object FormData. In the future projects when you have to actually send data to the server this object will be quite useful.

I see that you used JS for to switch the pictures in different versions. Interesting approach. but there is way to make it easier using only HTML. It's picture tag.

<picture>
    <source srcset="mobile.jpg" media="(max-width: 900px)">
    <img src="desktop.jpg" alt="">
</picture>

As you can see this element contains one or multiple source tags with different media conditions. So the picture will load the image from valid source or from img if there is no one.

Hope something of this could be helpful. Good luck =)

Marked as helpful

1

@yLucino

Posted

@Alex-Archer-I Hello! Thank you very much for the tips, I applied them to the project and it works. If you could check again to see if it is in order, I would appreciate it in advance! Have a great day Mr. Alex.

1
Alex 3,130

@Alex-Archer-I

Posted

@yLucino

Yep, that's it =)

You can do it even better by reducing the number of tags. For example, you can wrap Email address and Valid email required with a span and put them into one label. Than you can style it directly without div wrapper.

That can be said about picture too. You can add container-subscribe-img class to the picture and get rid of div wrapper. The less tags, the better =)

Oh, and don't forget that every time when you encounter a some kind of list you should use ul or ol tags with li inside them.

Have a great day too =) And fell free to ask or comment something if you need =)

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