Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
If you change the name of the repository, you must update the github link in this solution.
HTML π:
- The
lang
attribute is used to declare the language of the webpage. Add thelang
attribute to the<html>
tag with the valueen
.
- The
viewport
meta tag is missing. theviewport
meta tag is used to control the layout of the page on mobile devices. Add theviewport
meta tag to the<head>
tag:<meta name="viewport" content="width=device-width, initial-scale=1.0">
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- Always avoid skipping heading levels; Always start from
<h1>
, followed by<h2>
, and so on up to <h6> (<h1>,<h2>,...,<h6>). Swap the<h2>
tag with<h1>
- Since this component involves scanning the QR code, the image is not a decoration, so it must have an
alt
attribute. Thealt
attribute should explain its purpose. e.g.QR code to frontendmentor.io
CSS π¨:
- The color of the paragraph element is unreadable because it is too light compared to its background. For example, change the color to
hsl(220deg, 15%, 55%)
.
- To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here π.
body { background-color: #B0C4DE; min-height: 100vh; display: grid; place-content: center; } .main { max-width: 320px; background-color: white; /* margin: 150px 600px; */ padding: 20px; border-radius: 10px; }
-
You should use a CSS reset to remove the default browser styles and make your page look the same in all browsers.
Popular CSS resets:
I hope you find it useful! π
Happy coding!
Marked as helpful0 - The
- @HassiaiPosted almost 2 years ago
Add a language attribute
lang="en"
to the html tag <html> to fix error issue.. Replace <div class="main"> with main tag, the content must contain <h1> to fix the accessibility issue. click here for more on web-accessibility and semantic htmlthe GitHub repository is not available
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0
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