Ping Coming soon page written in JS, HTML, and CSS
Design comparison
Solution retrospective
Hey!
This is the first time I use anything that is related to JS at ALL! I believe I did a good job with it, I decided to use media queries to help with the responsiveness as there was some issues with the inputs and texts being incorrectly positioned but fixed anyways, should worry across all widths and the preview might be ugly. please click the view site button for actual preview, I had a lot of trouble creating the JS Authentication for the email and displaying the text so I decided to just set the outline border color to red as I thought that would help indicate users that it was incorrect, and if it was correct I would set it to blue!
Couple of questions I have:
Could this be easier if I used JQuery? (If so, can you provide some links to where I can learn JQuery)
How can I improve?
How can I use JS to create an html text with correct positioning that acts as an error message?
Thank you!
Community feedback
- @vanzasetiaPosted about 2 years ago
Hi, TwoThreeTwo! 👋
Congratulations on finishing this challenge! 🎉
I recommend using JavaScript. Modern JavaScript is good enough for this project. So, I don't recommend using jQuery, especially if you think that you are not good enough at JavaScript.
I suggest visiting the "You Might Not Need jQuery". Right there, you can find a lot of ways how to use JavaSript instead of using jQuery.
Here are some suggestions for improvements.
- First, I recommend fixing all the issues that have been generated. It is important to get the HTML right first.
input
element must have label or accessible name. Otherwise, screen readers won't know how to pronounce theinput
to the users. I recommend usingaria-label
attribute to label the input (aria-label="Email"
).- The "Notify Me" button should be inside the
form
element. It also should havetype="submit"
. - Put the
script
above the closingbody
tag (</body>
). - Never use the HTML event handler attributes. It is never a good idea to mix up HTML and JavaScript. It's best to keep them separated. Reference: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#other_event_listener_mechanisms
- Social media icons are social media links. So, wrap each of them with an anchor tag. Then, use
aria-label
to label each link.
To answer your question about showing an alert message, I wrote an article about creating form validation. You can follow the HTML structure for the alert message.
I hope this helps! Happy coding!
1@LarryTheFatCatPosted about 2 years agoHey @vanzasetia!
Thank you for this info, it was really helpful!
I just changed the things you have said, they were really helpful, although I went ahead and looked at the HTML Validation issues but it seems that the css errors that are showing are non existent in my code? I don't seem to know why.
I took a look at the article you wrote by the way, and I just want to say it helped a lot!
0@vanzasetiaPosted about 2 years ago@TwoThreeTwo
You are welcome! Happy to hear that was helpful! 👍
For the CSS errors on the HTML validation, they are coming from Font Awesome. It's okay, you can ignore them.
But, you can remove them by only using the icons needed for the project. Just download the necessary icons and then remove the
script
tag. Not only does this remove all the errors, but the site will also load much faster.Thank you for telling me that! I am happy to know that my article helped you! 😄
0
Please log in to post a comment
Log in with GitHubJoin 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