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.
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">
- The <title> tag is used to specify the title of a web page, which is displayed in the browser's title bar or tab, and is also used by search engines as the title of a page in search results.
- 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.
- You must use a level-one heading (h1) even though this is not a full-page challenge.
Alt text π·:
-
The
alt
attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a betteralt
attribute would beQR code to frontendmentor.io
If you want to learn more about the
alt
attribute, you can read this article. π.
CSS π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here π.
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>, add a tittle tag <tittle></tittle> within the head tag, add the alt attributealt=" "
to the img tag to fix the error isues. The value for the alt attribute is the description of the image.Give the tittle tag a content, its content is the tittle of the html file. Replace <div class="back"> with the main tag, <h2> with <h1> and h4 with <p> to fix the accessibility issue. click here for more on web-accessibility and semantic html
The body has a wrong background-color. Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
To center .back on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
To center .back on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center .back on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
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