Design comparison
Solution retrospective
What are the best resources to learn javascript?
Community feedback
- @correlucasPosted about 2 years ago
👾Hi @vinayak912002, congratulations on your solution!👋 Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:
- You've done the design for the wrong image, when you download the starter files the folder comes with 3 files (preview card, desktop and mobile) you've created the solution based on the
preview
and you should consider only themobile + desktop images
.Remove thebackground-color
from the container and add it to thebody
to make sure this color background will display it full screen. - 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
<strong>
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. - Add a margin of around
margin: 20px
to avoid the card touching the screen edges while it scales down. - Use relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.
Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
✌️ I hope this helps you and happy coding!
Marked as helpful1 - You've done the design for the wrong image, when you download the starter files the folder comes with 3 files (preview card, desktop and mobile) you've created the solution based on the
- @grace-snowPosted about 2 years ago
I'm afraid this doesn't look finished yet. It's not at all like the design.
Here are some tips:
- use a modern css reset at the start of every project. Look them up. Josh Comeau and Andy Bell both have good examples. This will do things like remove margin from body, set images to display block etc
- do not use margin to center a component on the screen. Use flex/grid properties along with min-height 100vh on the body in this challenge
- It's great you've used max width on the card, but 200px is too small. Make it larger and I recommend using rem unit instead
- use the colors and font family from the style guide. e.g. background color and font color is not right on this
- you will need to link the font family from Google fonts in the head of your document and then use the family in CSS
- use the font size from the styleguide on body, but convert it to REM (font size should never be in px)
- use landmarks - this should have a main element at least. The attribution should not be in the card, so make that a footer on the page
- choosing the correct html elements is really really important. This card should have an img, a heading element and a paragraph, that's all. No strong tag
- alt text on an important image needs to be a human-readable description, not a hyphenated string like you'd use for a class name. This image should say "QR code to frontendMentor.io"
- Do not use
br
element. It's rare you'll need it, but definitely not for things like this when it should be two block elements, a heading and a paragraph - let the img be width 100%. It does not need left/right margin
- Don't rely on line height from the browser, say how you want the text in headings and body to look. Line height should at least be 1.2 for headings and 1.5 for body usually
- Same with margins. Don't rely on browser defaults which can vary across browsers. You should be setting margin top/bottom on the elements inside the card.
- Use classes directly on what you want to style in CSS. Try not to use nested element selectors like
.class-name element
as this increases the specificity of the selectors and makes CSS hard to work with on bigger projects. It doesn't matter so much on a tiny project like this, but could matter a lot on big projects.
0 - @ojaswishivamPosted about 2 years ago
Hello @vinayak912002
-
For learning JavaScript you can learn it from a (Youtube Channel)Code with Harry (language- Hindi). Here is the link: https://youtube.com/playlist?list=PLu0W_9lII9ahR1blWXxgSlL4y9iQBnLpR
-
You can also learn it from W3Schools website. Here is the link: https://www.w3schools.com/js/
0@grace-snowPosted about 2 years ago@ojaswishivam this is very strange feedback for this solution!
0@ojaswishivamPosted about 2 years ago@grace-snow I only replied to what he had asked
0@grace-snowPosted about 2 years ago@ojaswishivam ah I didn't see that question.
It's good to point people to the Frontend mentor resources page, that has lots of ideas too
0 -
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