@rayaatta
Posted
Hello ๐Egor, congratulations on completing this challenge ๐.
I have some suggestions you might find interesting.
1
Try to make your html more Semantic by wrapping the main page content inside a <main>
tag .
Replace
<div class="main_block"
With
<main class="main_block"
.
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.
2
I noticed <h2>
as the first heading in your code you should replace it with <h1>
. And then replace <h4>
with <h2>
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
3 In your html I noticed
<p class="date">Published 21 Dec 2023</p>
When a screen reader is reading the above it will pronounce 21 Dec 2023
as it is. This should be wrapped in
<time datetime="2023-12-21">21 Dec 2023</time>
This is machine readable therefore it is more accessible. To find out more about the time tag check out this article๐.
4
You used
width: 435px;
On the .card
This is okay but in case a screen is less than 435px wide then the card overflows the view port.
You can make it more responsive by using
max-width:min(90%,435px)
This means it is 435px but on smaller screens it only covers 90% of the width.
I hope this helps ๐
Otherwise your solution is neat๐ Happy coding โ๏ธ
@Gorrchik
Posted
@rayaatta Thank you, I will try to add this things in next solution.