DEV Community

Cover image for How to start Front-end Coding Challenges ? - Frontend Mentor
Hari Ram
Hari Ram

Posted on

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
├── assets
│   ├── designs
│   └── images
├── css
│   └── styles.css
├── index.html
├── scripts
│   └── scripts.js
└── .gitignore
Enter fullscreen mode Exit fullscreen mode

I use the above project structure. You'll get 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

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">
    <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>
      content="This is a front-end coding challenge - Challenge Name"
    <link rel="preconnect" href="">
    <link rel="stylesheet" href="./css/styles.css" />
      <!-- Happy Coding -->
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

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

  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-size: 62.5%;

html, body{
  height: 100%;

  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.

Top comments (5)

max88git profile image
Max Lockwood

Thank you for sharing! This was a fantastic read. I've completed a few Frontend Mentor challenges but never knew how to begin a project.

aaronmccollum profile image
Aaron McCollum

Thanks for sharing! I'm going to check this out.

nemanajay profile image
Ajay Neman

Thank u so much man. I couldn't know about this. Thanks for sharing

hariramjp777 profile image
Hari Ram


moniv9 profile image
Mohit Verma

To prepare for your frontend/javascript interview. You can look at this ebook I created with collections of commonly asked frontend questions with solution.