Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR Code Component solution v1

P
Matias Baldanzaβ€’ 20

@matiasbaldanza

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I'm not sure why we are given breakpoints for mobile and desktop in the challenge specs when the component itself (the QR code card) is not responsive.

Anyway, this is just my first try. :-)

Community feedback

Adrianoβ€’ 33,990

@AdrianoEscarabote

Posted

Hi Matias Baldanza, how are you?

I really liked the result of your project, but I have some tips that I think you will like:

1- Every page should have one main landmark <main>. So replace the div that wraps the whole content with <main> to improve the accessibility. click here

2- All page content should be contained by landmarks, you can understand better by clicking here: click here

We have to make sure that all content is contained in a reference region, designated with HTML5 reference elements or ARIA reference regions.

Example:

native HTML5 reference elements:

<body>
    <header>This is the header</header>
    <nav>This is the nav</nav>
    <main>This is the main</main>
    <footer>This is the footer</footer>
</body>

ARIA best practices call for using native HTML5 reference elements instead of ARIA functions whenever possible, but the markup in the following example works:

<body>
     <div role="banner">This is the header</div>
     <div role="navigation">This is the nav</div>
     <div role="main">This is the main</div>
     <div role="contentinfo">This is the footer</div>
</body>

It is a best practice to contain all content, except skip links, in distinct regions such as header, navigation, main, and footer.

Link to read more about: click here

2- Why it Matters

Navigating the web page is far simpler for screen reader users if all of the content splits between one or more high-level sections. Content outside of these sections is difficult to find, and its purpose may be unclear.

HTML has historically lacked some key semantic markers, such as the ability to designate sections of the page as the header, navigation, main content, and footer. Using both HTML5 elements and ARIA landmarks in the same element is considered a best practice, but the future will favor HTML regions as browser support increases.

Rule Description

It is a best practice to ensure that there is only one main landmark to navigate to the primary content of the page and that if the page contains iframe elements, each should either contain no landmarks, or just a single landmark.

Link to read more about: click here

Prefer to use rem over px to have your page working better across browsers and resizing the elements properly

The rest is great!!

Hope it helps...πŸ‘

Marked as helpful

1
Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

πŸ‘ΎHi @matiasbaldanza, 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:

1.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.

2.Add the website favicon inserting the svg image inside the <head>. <link rel="icon" type="image/x-icon" href="./images/favicon-32x32.png">

3.Use relative units as rem or em instead of px 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.

✌️ I hope this helps you and happy coding!

Marked as helpful

1

P
Matias Baldanzaβ€’ 20

@matiasbaldanza

Posted

@correlucas Hi, Lucas. Thank you for your feedback!

I did this live on stream, and I forgot to add the favicon. :-)

I'm doing another of these projects now, the NFT preview card, and will try and make it resizable-friendly by using relative units.

As for the <h2>, I chose to approach this as a component and not as a page in itself, which is why I refrained from using <h1>. I assume the <h1> heading level will be used by the page that hosts the component.

0
Miran Leginβ€’ 620

@miranlegin

Posted

Hi Matias,

first of all congratulations on completing your first project!

As you progress through the challenges you will notice that all projects have breakpoints set in style guide as this is sort of boilerplate common for all the challenges here. That being said that doesn't mean you must follow them strictly in your attempts to create breakpoints in your CSS. They serve as a guideline to how design should work and look like at certain breakpoints. It is your responsibility to choose correct breakpoints regarding content that is provided in challenge itself.

Hope that makes it somewhat clearer.

Keep coding! Cheers

Marked as helpful

1

P
Matias Baldanzaβ€’ 20

@matiasbaldanza

Posted

@miranlegin Thank you, Miran! Crystal clear. ❀️

0
Nneoma Njokuβ€’ 1,210

@SatellitePeace

Posted

Hello @matiasbaldanza

  • the card is responsive at least based on my test

  • All Front end mentor files contain breakpoints (usually 375px and 1440px) but it does not mean you have to use them all the time it all depends on the project and your own discretion

  • However, if the width of this QR card is more than 400px it may not look great so in this case, the breakpoint can guide you as to the maximum width your project should have

  • example

main{
max-width:375px;
width:100%;
}

I hope my explanations help nice work by the way

Marked as helpful

1

P
Matias Baldanzaβ€’ 20

@matiasbaldanza

Posted

@SatellitePeace Thank you, Nneoma!

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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