Rostyslav Nazarenko• 560
@rostyslav-nazarenko
Posted
Hello!
Great solution! A few suggestions.
- HTML
- use semantic elements. Wrap your code in
main
element or renamediv class="box"
tomain class="box"
. Useh1
instead of generaldiv
element - don't use
<br>
because screen readers will make pause in these places which will break the whole message, just let the text wrap by itself or use padding/margin to limit available space - read this article about Alternative Text
- don't set
width
andheight
attributes inimg
element, specify those with CSS like thismax-width: 100%
that way image will occupy available space and resize according to it
- use semantic elements. Wrap your code in
- CSS
- I wouldn't set
* { margin: auto; }
. It can create problems later on because in different casesmargin: auto;
behaves differently. Plus you usemargin
afterward and thus you overide previous rule. - there's no need in specifying
background-color
for each element as by default it is set totransparent
- don't limit
width
andheight
of card component, set onlywidth
or bettermax-width
- to create space around image and text use padding on
.box
- I wouldn't set
Great job! Goodbye!
Marked as helpful
1