Responsive News homepage using CSS Grid and Flexbox
Design comparison
Solution retrospective
-
The alt text for the images. I'm sure that the first one is for purely decorative purposes, but I'm not so sure about the other three, so I gave them alt text. Was it correct?
-
For the title of the 3 numbered articles I put an <a> into a <h2> for semantic purposes. Is it correct to give a link the semantic meaning of a heading this way?
I greatly appreciate any kind of feedback.
Community feedback
- Account deleted
- You should give alt text to every image. It helps those know what it is about incase the image doesn't load on their device. The alt text for image one and three are is decent. For the third image use a shorter alt. Try to be descriptive in as few words as possible. For e.g. you could call it "a modern-day keyboard".
- It's more appropriate to have the headings inside the <a></a> tags. The way you did it makes only the text clickable, if you did the other way around the complete line would be clickable which is more common. Like most other choices in web development it is not a choice of how valid it would be, if you prefer it that way, that's fine as well. But I'd recommend putting the h2 in the <a></a>
- Try not to use so many divs. Tags like aside section footer provide more semantic meaning.
Marked as helpful1 - @nelsonleonePosted almost 2 years ago
Hello , congrats on completing this challenge 🎉 🎉 🎉 Nice solution Hope this comment was helpful
Yes, only add
alt=
if the image sends a message, if they are just for decoration, use an emptyalt=""
and setaria-hidden="true"
And the headers, if they don't lead anywhere(link) there's no use adding a
<a>
to themHappy coding 🎉 🎉
Marked as helpful1
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