@Islandstone89
Posted
Hey, well done!
Here are some things you can implement to improve your solution even further - I hope you find them helpful :)
HTML:
-
Every webpage needs a
<main>
that wraps all of the content, except for<header>
andfooter>
. This is vital for accessibility, as it helps screen readers identify a page's "main" section. Wrap the card in a<main>
. -
Screen readers recognize images by default, so you should not include words like "image" or "photo" in alt text.
-
A button is something that triggers an action. I see "Learning" as a
<p>
, or possibly a link, but not as a<button>
. -
I would wrap the date in a
<time>
element:<p class="card__published">Published <time datetime="2023-12-21">21 Dec 2023</time></p>
. -
Wrap the footer text in a
<p>
.
CSS:
-
I would use the 'Figtree' font on the
body
:font-family: 'Figtree', sans-serif;
. -
On the
body
, changeheight
tomin-height
- this way, the content will not get cut off if it grows beneath the viewport. -
Remove the margin on the card, it is not needed, since you already have some
padding
on thebody
. -
On "Learning", remove
box-sizing: border-box
, as that is already set on all elements in the CSS Reset. Also removedisplay: flex
andmax-width: 25%
, and changewidth: auto
towidth: fit-content
- this makes "Learning" only take up as much width as its content. To create some space around the text, and keep it centered, add somepadding
:padding: 4px 16px
works fine for me when experimenting in DevTools. -
On the author image, I would change
max-width
towidth
, and instead ofmargin-right
, I would add agap
on the parent,.card__author
.