Submitted 7 months ago
Frontend Mentor - Newsletter sign-up form - TailwindCSS - Javascript
@smhnfreelancer
Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
- I used Tailwind CSS and advanced features like
safelist
in the Tailwind. - I implemented the Javascript part easily.
- Some classes in the Tailwind features were not rendered, because they are not available on the HTML, but you can use advanced features like
safelist
. - I used Tailwind CSS component features too.
I like to write clean code, fast easy and I made lots of ID selectors, may be there is a more efficient way than making a whole bunch of ID selectors.
Community feedback
- @mofadaPosted 4 months ago
The HTML code you provided already has a good structure and semantics, but there are still some areas that can be optimized:
- Semantic tags: Consider replacing some
div
tags with more semantic tags, such asheader
,section
,article
, etc., to improve readability and accessibility. - Optimize the
alt
attribute of images: Currently, thealt
attribute of theimg
tag is empty, which is not conducive to SEO and barrier-free access. It is recommended to provide descriptive text for each image. - Reduce duplicate code: The use of
lg:hidden
andlg:flex
on image tags may cause unnecessary repeated rendering, so consider unified management. - Optimize style class names: For some style class names, such as
UL
andUL__item
, you can consider more descriptive names to express the purpose more clearly. - Icon optimization: The
favicon
icon can consider adding different size versions to meet the needs of different devices.
0 - Semantic tags: Consider replacing some
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