Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 month ago

Perfil de links sociais, usando HTML e CSS.

Israel Sobral•50
@israelsobral
A solution to the Social links profile challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What specific areas of your project would you like help with?

Gostaria dos feedback de vocês me orientando em que eu poderia está melhorando para poder ter um código mais limpo.

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Bernardo Poggioni•6,770
    @R3ygoski
    Posted about 1 month ago

    Olá Israel, parabéns pela conclusão desse desafio, ele ficou muito bom.

    Uma observação, você passou a URL errada para a parte de Repositoy URL, a correta seria: https://github.com/israelsobral/links-sociais. Que dessa forma até apareceria o seu repositório aqui no FEM, facilitando na busca, e também ao clicar em View Code.

    Sobre o que você citou, de deixar o código mais limpo, não vi muitas áreas que estavam verbosas ou com algum exagero. O único trecho que eu poderia sugerir um aprimoramento seria no CSS, que seria relacionado a evitar o uso de especificidade caso não seja necessário. Alguns desses casos:

    • p#descricao poderia ser só um #descricao, sem a necessidade desse p pois descricao é apenas utilizado em uma parte, sem ter repetiçõs, o que faz a especificade não necessária.
    • input.quadrado poderia ser só um .quadrado, por mais que ele seja reutilizado, toda reutilização dele é da mesma estilização, o que faz com que não seja necessário esse input antes.

    Agora algumas dicas quanto ao HTML. Sobre semântica, há algumas partes que poderiam ficar semânticas, como:

    • section poderia ser alterada para uma <article> pois é um conteúdo autoexplicativo, ou seja, faz sentido por si próprio.
    • p.destaque poderia ser alterada para uma <address> pois se trata de uma localidade.
    • div>a>input cada uma dessas, que nesse caso seriam os botões de link, poderiam ser substituídos pela tag <a> sozinha, sem nenhum outro HTML dentro dela.
    • Extra: Você também pode colocar esses links dentro de uma <ul>, que assim fica mais semântico ainda, um exemplo:
    <ul>
      <li>
        <a href="URL-para-meu-gh">Guthub</a>
      </li>
      <li>
        <a href="URL-para-meu-fem">Frontend Mentor</a>
      </li>
    </ul>
    

    Essa alteração que eu mencionei dos links também tem um motivo de acessibilidade e otimização de estrutura.

    Sobre a estrutura, essas <div> são redundantes, elas não estão sendo de fato necessárias, você conseguiria atingir o mesmo resultado apenas estilizando as tags <a>.

    Sobre a acessibilidade, não é recomendado colocar botões dentro de uma <a>, pois botões como <button> são utilizados para indicar uma interatividade no site, como por exemplo, mudar o tema da página, criar uma tarefa, abrir/fechar um modal, e por aí vai, já as tags <a> servem para indicar um hiperlink, e não uma interatividade.

    Ainda sobre acessibilidade, quando for utilizar um botão, recomendo o <button> ao invés de <input type="button"> pois ele tem mais vantagens como acessibilidade e flexibilidade de conteúdo (como colocar ícones ao invés de texto).

    E é isso! Novamente parabéns, caso tenha ficado qualquer dúvida, por favor comente abaixo que tentarei ajudar da melhor forma possível.

    Marked as helpful

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