Blog Preview Card Using Tailwind Only
Design comparison
Solution retrospective
Hello Friends, I have used the tailwind CSS to build this card. Suggest me if anything i have missed or i need to know to enhance my skills.
Community feedback
- @MelvinAguilarPosted about 1 year ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- You can use
h-screen
, which is the official abbreviation forh-[100vh]
, but even better, you can usemin-h-screen
to enhance the responsiveness of the page on small screens by using min-height.
- There are many shorthand values; for example, you can use
p-5
instead of "p-[20px]",w-80
instead of "w-[320px]",text-sm
instead of "text-[14px]",text-xs
instead of "text-[12px]", and so on.
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1@HimanshuKumawat13051997Posted about 1 year ago@MelvinAguilar thanks Buddy...i will consider this next time..
1 - You can use
- P@danielmrz-devPosted about 1 year ago
Hello @Ni8mare1997!
Your solution looks excelent!
I have just one suggestion:
-
For semantic reasons, and since that is the main title of the screen, you can replace the
h2
withh1
. -
The
<h1>
to<h6>
tags are used to define HTML headings. -
<h1>
defines the most important heading.<h6>
defines the least important heading. -
Only use one
<h1>
per page - this should represent the main heading/subject for the whole page. Also, do not skip heading levels - start with<h1>
, then use<h2>
, and so on.
This change has little or not effect at all on the project, but it makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.
I hope it helps!
Other than that, you did a great job!
1@HimanshuKumawat13051997Posted about 1 year ago@danielmrz-dev Thank You Buddy..Next time i will seek to improve these things.โ
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