@ecemgo
Posted
Some recommendations regarding your code that could be of interest to you.
HTML
In order to fix the accessibility issues:
- You need to replace
<div class="card">
with the<main class="card">
tag. You'd better use Semantic HTML, and you can also reach more information about it from Using Semantic HTML Tags Correctly. - Each main content needs to start with an h1 element. Your accessibility report states page should contain a level-one heading. So, you should use one
<h1>
element in the<main>
tag. You can replace your<h3 class="title">Improve your front-end skills by building projects</h3>
element with the<h1 class="title">Improve your front-end skills by building projects</h1>
element.
After committing the changes on GitHub and you need to deploy it as a live site. Finally, you should click generate a new report on this solution page to clear the warnings.
CSS
- If you want, you can give the recommended color for the background to the
body
, but it isn't necessary, creativity is always fine. :)
body {
/* background-color: lightsteelblue; */
background-color: hsl(212, 45%, 89%);
}
- If you remove the
height
from the.card
, the card will be better.
.card {
max-width: 310px; /* max-width makes the card responsive */
/* height: 48vh; */
}
- If you want to center
p
, you can addtext-align: center
.card > p {
text-align: center;
}
Hope I am helpful. :)
Marked as helpful