Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Social Proof Section ~ FlexBox | Responsive Design

accessibility
Cornflakes•290
@CornflakesPlus
A solution to the Social proof section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello FEM community!

I got extremely busy with my work this month, so this project took a while to complete. I only had time to code for two hours a week, seriously 😄. I wasn't able to code consistently with this project, so sometimes I felt out of context. It also has many missing pieces but I had to make it work.

Anyways, as always, I would appreciate any feedback. Some things I need guidance with are:

  1. How to have better HTML for the star icons without repetition
  2. Background image using the background-position property

and any other specifics. Thank you all!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Dusan Brankov•860
    @dusan-b
    Posted over 2 years ago

    Hi,

    you did a good job building semantic and accessible HTML.

    Regarding the rating stars, I think the only way to avoid repetition is to merge the SVG images into one image. However, you could also do something like the following:

    // HTML
    <div class="rated review">
      <span class="star-icon"></span>
      <span class="star-icon"></span>
      <span class="star-icon"></span>
      <span class="star-icon"></span>
      <span class="star-icon"></span>
    </div>
    
    // CSS
    .star-icon {
      width: 17px;
      height: 16px;
      background: transparent url("../images/icon-star.svg") center no-repeat;
    }
    

    According to MDN, the <section> element should usually contain a heading to indicate the content's purpose for SEO and assistive technologies. For the testamonials section I would consider replacing <section> with <div>, or alternatively adding a visually hidden <h2> element as a direct child of <section>.

    Besides that, your code is well structured. Keep it up!

    Marked as helpful
  • Suleman Tasawar•380
    @Suleman-Tasawar
    Posted over 2 years ago

    As far as i know that the Section tag is used when there is content that you want to show by order like for example consider a book it has headings,paragraph,diagrams Its default property is block

    section{ display block; }

    while the div tag does'nt have any special purpose you can put any content inside it.Consider you testamonial solution.You can use two parent div containers.One for the upper textual content and Another for the testamonial.

    <div> has default property display block;

    while the blockquote tag is used to reference a section quoted from another Page or Site

    <blockquote cite="www.frontendmentor.io/"> FrontendMentor:A Frontend Portal to practice Webdesigning </blockquote>

    Does this help you in any way

  • Cornflakes•290
    @CornflakesPlus
    Posted over 2 years ago

    I would appreciate it if someone can give some feedback on my HTML Semantics as well, like the use of <section> tags, <div> tags, and the use of HTML for testimonials. I used <blockquote> tags with headers.

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

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