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

Stats Preview Card Component Main

Danilo•110
@daaaan12
A solution to the Stats preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Este código é para uma página da web simples que exibe um componente "Stats Preview Card". A página da web é escrita em HTML e CSS e consiste em um cartão que exibe algum texto e uma imagem. O arquivo HTML contém a estrutura necessária para a página da web, incluindo os links para a folha de estilo e as imagens. O arquivo CSS contém todos os estilos para a página da web, incluindo o layout, cores, tipografia e design responsivo.

O arquivo HTML contém uma seção head que inclui alguns metadados sobre a página da web, como o conjunto de caracteres, viewport e título. A seção body contém o conteúdo principal da página da web, que é envolvido em um elemento div com o nome de classe card. O elemento card consiste em dois elementos filhos: container-texto e container-img. O elemento container-texto contém o texto principal do cartão, incluindo um cabeçalho, um parágrafo e algumas estatísticas. O elemento container-img contém uma imagem que é exibida no lado direito do cartão.

O arquivo CSS contém vários estilos para diferentes elementos da página da web, incluindo o cartão, container-texto, container-img e vários elementos de texto. Os estilos definem o layout da página da web, as cores usadas e a tipografia. O arquivo CSS também inclui uma consulta de mídia que ajusta o layout da página da web para telas menores.

Além dos principais arquivos HTML e CSS, o código também inclui uma importação de fonte que carrega duas Fontes do Google, Inter e Lexend Deca, que são usadas para a tipografia da página da web.


This code is for a simple webpage that displays a "Stats Preview Card" component. The webpage is written in HTML and CSS and consists of a card that displays some text and an image. The HTML file contains the necessary structure for the webpage, including the links to the stylesheet and the images. The CSS file contains all the styles for the webpage, including the layout, colors, typography, and responsive design.

The HTML file contains a head section that includes some metadata about the webpage, such as the character set, viewport, and the title. The body section contains the main content of the webpage, which is wrapped inside a div element with the class name card. The card element consists of two child elements: container-texto and container-img. The container-texto element contains the main text of the card, including a heading, a paragraph, and some statistics. The container-img element contains an image that is displayed on the right side of the card.

The CSS file contains several styles for different elements of the webpage, including the card, container-texto, container-img, and various text elements. The styles define the layout of the webpage, the colors used, and the typography. The CSS file also includes a media query that adjusts the layout of the webpage for smaller screens.

In addition to the main HTML and CSS files, the code also includes a font import that loads two Google Fonts, Inter and Lexend Deca, that are used for the typography of the webpage.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Danilo's solution.

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

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.