Design comparison
Solution retrospective
All feedback is welcome. Thank you in advance!!!
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @Lorgensky 👋, good job completing this challenge, and welcome to the Frontend Mentor Community! 🎉
I like this solution for the challenge. Here are a few suggestions I've made that you can consider in the future if you're looking to improve the solution further:
- Try to use semantic tags in your code. Click here for more information.:
With semantic tags:
<body> <main class="container"> <article class="card"> . . . </article> </main> <footer class="attribution"> . . . </footer> <body>
- Add descriptive text to the
alt
attribute of the images. The text must clearly describe the image. The alt attribute enables screen readers to read the information about on-page images and will be displayed instead if an image file cannot load. - The
<br>
tag is not a semantic tag, so you should not use it. Also, if a screen-reader reads the text, it will break the flow of reading at the line break tag, so it should be used to add vertical spacing. There are only a few cases where it is necessary (for example, in a poem or an address), and it is possible to avoid them by applying padding and margin styles via CSS. More information here.
For example, you could remove the <br> tag and add
margin-inline: 1rem;
to the<p>
element and you would have the same result.- Use an h1 tag for your solution. The
<h1>
element is the main heading on a web page. There should only be one<h1>
tag per page, and always avoid skipping heading levels; Always start from<h1>
, followed by<h2>
, and so on up to <h6> (<h1>,<h2>,...,<h6>). The HTML Section Heading elements (Reference)
<h1>Improve your front-end skills by building projects</h1>
- The container isn't centered correctly. You can use flexbox to center elements:
body { width: 100%; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
Additionally, remove the margin to center the card correctly.
Links with more information:
- The Complete Guide to Centering in CSS.
- A Complete Guide to Flexbox (CSS-Tricks).
- How TO - Center Elements Vertically (W3Schools).
- CSS Layout - Horizontal & Vertical Align (W3Schools).
I hope those tips will help you.
Good job, and happy coding!
Marked as helpful2@LorgenskyPosted about 2 years ago@MelvinAguilar Thanks a lot for your feedback. Sincerly I learn a lot in your feedback, I didn't know the semantics term before. I already done some projects, for my school, and some friends, I have really ignore this rule. thanks.
1 - @LovelyFaisalPosted about 2 years ago
Hi! You've done great 💪
Here are some suggestions to improve your code:
- Use <main> instead of a simple <div> this way you improve the semantics and accessibility showing which is the main block of content on this page. Remember that every page should have a <main> block and that <div> doesn't have any semantic meaning.
- Replace the <h2> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.
Marked as helpful1@LorgenskyPosted about 2 years ago@LovelyFaisal thanks, and I'm verry happy that you take time to give me feedback, so cool.
0 - @PhoenixDev22Posted about 2 years ago
Hello John,
Congratulation on completing your first frontend mentor challenge. I have some suggestions regarding your solution:
- An explicit width is not a good way to have responsive layout . Consider using
max-width
to the card inrem
.
- It's a good practice to have the styles in separate file. The reason for this is that the CSS stylesheet exists for the purpose of defining the presentation style of the document. The HTML file exists to define the structure and content of the document also it's useful If multiple pages on your site have the same look and feel.
- Adding
rel="noopener"
orrel="noreferrer"
totarget="_blank"
links. When you link to a page on another site usingtarget=”_blank”
attribute, you can expose your site to performance and security issues.
- Consider including a git ignore. Less important in this challenge but will become extremely important as you move onto larger projects with build steps.
Great job on this one. Hopefully this feedback helps.
Marked as helpful0@LorgenskyPosted about 2 years ago@PhoenixDev22 Thanks a lot, to the next challenge I will try to use min or max width, I didn't have the ability to use it. so, I will try to do the best.
1 - An explicit width is not a good way to have responsive layout . Consider using
Please log in to post a comment
Log in with GitHubJoin 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