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

Responsive web using only html and css

Johnโ€ข 20

@Lorgensky

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


All feedback is welcome. Thank you in advance!!!

Community feedback

@MelvinAguilar

Posted

Hi @Lorgensky ๐Ÿ‘‹, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐ŸŽ‰

I like this solution for the challenge. Here are a few suggestions I've made that you can consider in the future if you're looking to improve the solution further:

With semantic tags:

<body>
   <main class="container">
      <article class="card">
         . . .
      </article>
   </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.
  • The <br> tag is not a semantic tag, so you should not use it. Also, if a screen-reader reads the text, it will break the flow of reading at the line break tag, so it should be used to add vertical spacing. There are only a few cases where it is necessary (for example, in a poem or an address), and it is possible to avoid them by applying padding and margin styles via CSS. More information here.

For example, you could remove the <br> tag and add margin-inline: 1rem; to the <p> element and you would have the same result.

  • Use an h1 tag for 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)
<h1>Improve your front-end skills by building projects</h1>
  • The container isn't centered correctly. You can use flexbox to center elements:
body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

Additionally, remove the margin to center the card correctly.

Links with more information:

I hope those tips will help you.

Good job, and happy coding!

Marked as helpful

2

Johnโ€ข 20

@Lorgensky

Posted

@MelvinAguilar Thanks a lot for your feedback. Sincerly I learn a lot in your feedback, I didn't know the semantics term before. I already done some projects, for my school, and some friends, I have really ignore this rule. thanks.

1
Faisal Alharbiโ€ข 330

@LovelyFaisal

Posted

Hi! You've done great ๐Ÿ’ช

Here are some suggestions to improve your code:

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

Click here for more information

Marked as helpful

1

Johnโ€ข 20

@Lorgensky

Posted

@LovelyFaisal thanks, and I'm verry happy that you take time to give me feedback, so cool.

0
PhoenixDev22โ€ข 16,950

@PhoenixDev22

Posted

Hello John,

Congratulation on completing your first frontend mentor challenge. I have some suggestions regarding your solution:

  • An explicit width is not a good way to have responsive layout . Consider using max-width to the card in rem.
  • It's a good practice to have the styles in separate file. The reason for this is that the CSS stylesheet exists for the purpose of defining the presentation style of the document. The HTML file exists to define the structure and content of the document also it's useful If multiple pages on your site have the same look and feel.
  • Adding rel="noopener" or rel="noreferrer" totarget="_blank"links. When you link to a page on another site using target=โ€_blankโ€ attribute, you can expose your site to performance and security issues.
  • Consider including a git ignore. Less important in this challenge but will become extremely important as you move onto larger projects with build steps.

Great job on this one. Hopefully this feedback helps.

Marked as helpful

0

Johnโ€ข 20

@Lorgensky

Posted

@PhoenixDev22 Thanks a lot, to the next challenge I will try to use min or max width, I didn't have the ability to use it. so, I will try to do the best.

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