Hello @Yannisp2000
Great solution you've got here, well done!
If you don't mind, I have a few suggestions I'd like to share about semantic HTML for improvement:
π First: Use <main> to wrap the main content instead of <div>.
Think of <div> and <span> in HTML like plain boxes or placeholders. They're handy for holding content, but they don't tell us anything about what's inside or what it's meant for on the webpage.
π Second: Use <h1> for the main title instead of <h2>.
Unlike what most people think, it's not just about the size and weight of the text.
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/title for the whole page. And don't skip heading levels - start with <h1>, then use <h2>, and so on.
All these tag changes may have little or any visual impact but they make your HTML code more semantic and improve SEO optimization as well as the accessibility of your project.
π Third: There are two active hover effects for the card when the user places their cursor over them. One for the Title of the card and one for the box-shadow. I've provided a snippet from my CSS stylesheet for you to have a look.
/* Box-shadow hover effect */
.container {
max-width: 400px;
margin-inline: auto;
background-color: var(--white);
padding: 1.5rem;
margin-bottom: 2rem;
border: 2px solid var(--black);
border-radius: 1rem;
box-shadow: 10px 10px 0px var(--black);
transition: 0.5s;
}
.container:hover {
box-shadow: 15px 15px 0px var(--black);
}
/* Title hover effect */
.container h1 {
color: var(--black);
font-family: 'Figtree', sans-serif;
font-size: 26px;
font-weight: 800;
margin-bottom: 0.8rem;
}
.container h1:hover {
color: var(--yellow);
cursor: pointer;
}
All in all your solution looks awesome. I hope this helps. Keep up the great work!