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

html css

Ahmed Salamaβ€’ 70

@AhmeedSalama

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

rayaβ€’ 2,850

@rayaatta

Posted

Hi Ahmed SalamaπŸ‘‹, congratulations on completing your first FED challenge πŸŽ‰

I have some suggestions you might find useful.

1 I noticed <h2> in your code.since it is the only heading in the document you should replace it with <h1>.

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/subject for the whole page. Also, do not skip heading levels - start with <h1>, then use <h2>, and so on. You can then style them in you css.

Unlike what most people think, it's not just about the size and weight of the text It is about maintaining a clear and consistent hierarchy through out the document

2 Try to make your html more Semantic by wrapping the main page content inside a <main> tag . Replace <div class="card"> With <main class="card">. This changes nothing visually but Using it makes all the difference. Using semantic markup improves

SEO

And user experience (accessibility) for people using assistive technology such as screen readers.

3 Change height: 100vh; on the body to min-height:100vh; This makes sure that content does not overflow on short devices or mobile devices in landscape mode.

4) You used width: 330px; On the .card This is okay but in case a screen is less than 330px wide then the card overflows the view port. You can make it more responsive by using max-width:min(90%,330px) This means it is 330px but on smaller screens it only covers 90% of the width.

5 remove left:25px from * because it is offsetting your card from the center

I hope this helps πŸ™ƒ

Otherwise nice solution πŸ˜‰

Happy coding ✌️

Marked as helpful

0

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