@vanzasetia
Posted
Hi, BreinerJT! 👋
Congratulations on finishing this challenge! 👏 It's great to see you completing another challenge! 😄
For the input
element, I would recommend using the correct type
for the input. Mobile users rely on the virtual keyboard. The virtual keyboard can show the correct keyboard layout based on the type
of the input
element. This will make the user experience for mobile users much better. 😉
To prevent the native form validation, I suggest adding the novalidate
attribute to the form
element instead.
Some more suggestions.
- I recommend using all classes begin with
js-
to select DOM elements within the JavaScript. Keep in mind, that only use thejs-
classes only for JavaScript purposes. This will make sure that when you refactor or worik with the CSS or the JavaScript you won't have to worry about both of them at the same time.
// Example
const form = document.querySelector(".js-form");
- Always use classes to reference all the elements that you want to style. Using
id
is going to make your stylesheet have high specificity (hard to maintain). As a side note, ideally,id
should be used for anchoring.
That's it! Hope this helps. 😊
Marked as helpful
@BreinerJT
Posted
Thank you @vanzasetia, your feedbacks are always amazing.
@vanzasetia
Posted
@BreinerJT No problem! 👍