Design comparison
Solution retrospective
-
I am really new to HTML and CSS. Does anyone have any recommended best practices I should follow?
-
Is there a better way to make text responsive to screen size? The card dimensions in my solution do not quite match the design image for mobile version.
Community feedback
- @therealmaduanusiPosted 10 months ago
Try and change the h1 into a p tag, you can embed it with an anchor tag(<a>)
Marked as helpful1@AzpenMeadowsPosted 10 months ago@therealmaduanusi
Thanks! I didn't even consider that the blog "preview" card should actually link to an actual (in this case fake) blog.
Thanks for the tip regarding h1. I approached this as a full project, but it makes sense now as the h1 element for an actually webpage would not be within a card.
Thanks for the feedback!
0 - @danielmrz-devPosted 10 months ago
Hello @AzpenMeadows!
Your solution looks excelent!
Despite @therealmaduanusi's comment, I have another perspective about the title:
- Use
<h1>
for the main title of the card. It's not just a link. It's the main heading of the card. Wrapping it with ap
anda
tags would make more sense it the card was part of a bigger website and the title of the card wouldn't be the main title of the page. Here, the card is all we have on the page, though.
About headings, here's a quick guide on how to use them:
š 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.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!
Marked as helpful0@AzpenMeadowsPosted 10 months ago@danielmrz-dev
This makes a lot of sense! Thank you so much!
1 - Use
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