How to start Front-end Coding Challenges ? - Frontend Mentor

hariramjp777

Hari Ram

Posted on January 9, 2021

How to start Front-end Coding Challenges ? - Frontend Mentor

We all know that there is a website called Frontend Mentor where we'll be given some awesome real world front-end challenges to practice and enhance our frontend skills.

Thanks to Frontend Mentor, I completed about ten challenges, I really learnt a lot.

Get Started

Frontend Mentor

  • Open a challenge and download starter files (as .zip)

Frontend Mentor gif

Start your project

  • Open your projects folder.
  • Create a new directory
frontend-[CHALLENGE NAME]
├── assets
│   ├── designs
│   └── images
├── css
│   └── styles.css
├── index.html
├── readme.md
├── scripts
│   └── scripts.js
├── style-guide.md
└── .gitignore
Enter fullscreen mode Exit fullscreen mode

I use the above project structure. You'll get style-guide.md and image files from starters. Just copy them here.

designs directory contains your output screenshots and if you wish, you can include them in your readme.md.

HTML starter template

I created a little snippet in my Visual Code Editor and it generates starter template for Frontend Mentor in one tab.

Here it is,

Alt Text

Here is the starter template index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Frontend Mentor | Challenge Name</title>
    <meta
      name="description"
      content="This is a front-end coding challenge - Challenge Name"
    />
    <link
      rel="icon"
      type="image/png"
      sizes="32x32"
      href="./assets/images/favicon-32x32.png"
    />
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link
      href="https://fonts.googleapis.com/"
      rel="stylesheet"
    />
    <link rel="stylesheet" href="./css/styles.css" />
  </head>
  <body>
      <!-- Happy Coding -->
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

CSS Styles

When it comes to CSS, I always love to start from scratch.

No website is completely unstyled.

Browser has a default style sheet called User Agent Stylesheet which adds margin to headings and paragraphs and applies font properties to all elements.

I usually reset all the styles and I start from scratch.

Here is my styles.css

:root{
  /* colors and fonts */
  --font: "Montserrat", sans-serif;
  --white: #ffffff;
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html{
  font-size: 62.5%;
}

html, body{
  height: 100%;
}

body{
  width: 100%;
  font-family: var(--font);
}

/* Other rule-sets */

Enter fullscreen mode Exit fullscreen mode

There we go, Now we can start writing actual content to design the page.

Frontend Mentor Challenges will be really helpful for those who are looking to enhance their frontend skills.

💖 💪 🙅 🚩
hariramjp777
Hari Ram

Posted on January 9, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related