Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

Order Summary Component - HTML, CSS, Google Fonts

P
Heather Smith•240
@sorengrey
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Didn't have much trouble with this one, but I do feel like my hero image is slightly off.

If you have any suggestions on how to improve, I'd love to hear them. Thanks!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mohamed ELIDRISSI•435
    @elidrissidev
    Posted almost 4 years ago

    As mentioned already by fellow members there are some issues with the semantics. You also should always consider having one h1 on every page that describes its content. For example this page can have the "Order summary" text be inside an h1 as it perfectly describes the main purpose of this page, you can then style it differently to match the design. I'll also advice to check the report of your solutions as it helps you find issues like these. Good luck!

    Marked as helpful
  • Chamu•13,820
    @ChamuMutezva
    Posted almost 4 years ago

    The <section> HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.

    Sections with no headings do not appear in the document outline. If you did want force the inclusion of such an HTML block inside the document outline but not affect the visual output in any way, you could include a heading but hide it: Source - MDN

    • in your code there is several blocks of code with no other content in it, I am of the opinion that there are other elements that could have been used, a heading element and a paragraph for example.
    Marked as helpful
  • Fluffy Kas•7,655
    @FluffyKas
    Posted almost 4 years ago

    Hey, it's not just the image, the whole card seems to be off on smaller screen sizes :)

    Few things you could do:

    1. Add your readme to the project.
    2. Using ids are discouraged, unless you have a good reason to do so. In this case, simple classes would do the job perfectly.
    3. You're using sections instead of choosing the semantically correct elements, like divs, paragraphs and titles.
    4. Instead of width and height, you could use min- and max-height, min- and max-width to make your solution more responsive. Using % is useful sometimes but can backfire, as it does in your code.
    5. For your hero image, you could add it to your html so it's easier to style.
    Marked as helpful
  • Davide•1,705
    @Da-vi-de
    Posted almost 4 years ago

    Fluffy Kas has made a great point on ids, also i'd like you to be aware of specificity especially for bigger projects. This is an article that might help you understand what i mean. Keep coding :-)

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub