Design comparison
Solution retrospective
Please I wish for an easier approach to this because I struggled and it took me a lot of time.
Community feedback
- @vanzasetiaPosted about 2 years ago
Hello there! 👋
First, I strongly recommend writing your code with a consistent style (e.g. the indentation, quotes, whitespace, etc). If you write your code that way, it will make it easier to read for everyone (including your future self). You can use a code-formatter instead such as Prettier to automatically format your code.
Remove all
br
elements from the heading and paragraph. Screen readers will read outbr
elements as "break". Let lines wrap where they need to. For more information, read the "Accessibility concerns" part of the MDN documentation forbr
.I have three recommended videos. The first one tells how hard HTML is (HTML is not easy). The other two talk about modern CSS techniques and approaches.
- Manuel Matuzović - Lost in Translation - YouTube
- Andy Bell – Be the browser’s mentor, not its micromanager - YouTube
- Stephanie Eeckles - Scaling CSS Layout Beyond Pixels - YouTube
That's it! I hope this helps!
Marked as helpful1 - @MelvinAguilarPosted about 2 years ago
Hi @Isaiah-0914 👋, good job completing this challenge, and welcome to the Frontend Mentor Community! 🎉
Here are some suggestions you might consider:
- Try to use semantic tags in your code. Click here for more information.:
With semantic tags:
<body> <main class="code"> . . . </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. - Use
max-width: 300px
to.code
selector instead of width, this will make the card container a bit responsive on mobile and set the element's maximum width to 300px. - Add an h1 tag to 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)
Solution:
<h1>Improve your front-end skills by building projects</h1>
The <p> element represents paragraph-level content, usually text:
<p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
- Update the image selector to make responsive images.
img { width: 100%; object-fit: contain; border-radius: 10px; }
I hope those tips will help you.
Good job, and happy coding!
Marked as helpful1 - @AdrianoEscarabotePosted about 2 years ago
Hi NKEMBOH ISAIAH, how are you?
Welcome to the front-end mentor community!
I really liked the result of your project, but I have some tips that I think you will enjoy:
- every Html document must contain the main tag, so we can identify the main content, to fix this, wrap all the content with the main tag. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
- Consider using rem for font size .If your web content font sizes are set in absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. Relative units “stretch” according to the screen size and/or user’s preferred font size, and work on a large range of devices.
- You have used <br> , using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology. Screen readers may announce the presence of the element. This can be a confusing and frustrating experience for the person using the screen reader. You can read more in MDN.
- To align some content in the center of the screen, always prefer to use
display: flex;
it will make the layout more responsive!
Example:
body { margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
The rest is great!
I hope it helps... 👍
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