Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Blog Preview Card using HTML, CSS

Jason Konradā€¢ 60

@AzpenMeadows

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

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

Victorā€¢ 510

@therealmaduanusi

Posted

Try and change the h1 into a p tag, you can embed it with an anchor tag(<a>)

Marked as helpful

1

Jason Konradā€¢ 60

@AzpenMeadows

Posted

@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
Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

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 a p and a 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 helpful

0

Jason Konradā€¢ 60

@AzpenMeadows

Posted

@danielmrz-dev

This makes a lot of sense! Thank you so much!

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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