Vanza Setia• 27,795
@vanzasetia
Posted
Hi, Ana! 👋
Here are some suggestions for improvements.
- Wrap the text with a meaningful element: For example, use a paragraph element to wrap the text including the error message. There should not be text in
<span>
and<div>
alone. - Progressive enhancement: Add the
novalidate
attribute to the<form>
through JavaScript. Then, addrequired
attribute to all<input>
elements. This way, if the JavaScript fails to load or the users disable JavaScript, the native form validation will be running. - Do not use legacy or deprecated elements: Use
<button type="submit">
instead of<input type="submit">
. Submit input is legacy. - One declaration for
@import
: You only need to write@import
once on the stylesheet. As a side note, using<link>
tags are recommended for better performance. - Do not use pixel unit for font sizes: Use
rem
orem
instead ofpx
for font sizes. Never usepx
unit. Relative units such asrem
andem
can adapt when the users change the browser's font size setting. Learn more — Why you should never use px to set font-size in CSS - Keep the
.gitignore
: This can prevent your repository from getting filled with.DS_Store
files.
I hope this helps. Happy coding! 👍
0