Front-End Interview Questions

I have started applying to junior web developer positions to see if I have the necessary skills to start working. Today I had a call with a recruiter who asked me several questions that I didn’t know the answer to. The position she was trying to place me in was a front-end role so the questions are more geared towards the front-end development of web applications.

The questions:

  1. What are CSS sprites?
    CSS sprites are a way to combine multiple images into one image file to help performance. This way, you only need to load your images with one HTTP request.
    Read more on sprites and how to implement them here.
  2. What is the difference between px and em?
    • px stands for pixels and each pixel represents a dot on your computer screen. Pixels are fixed-size units which means that they are not scale-able to tablets and mobile devices. It’s great to use px for your styling and design, but not for font sizes.
    • em is best to use for scaling font sizes because it adapts to all devices and is very mobile friendly. 1em = default document font size (usually 12pt).

    Kyle Schaeffer explains it best.


  3. What is the difference between visibility: hidden and display: none?
    • visibility: hidden hides the element, but the element will still affect the layout and take up the same space.
    • display: none does NOT occupy space on a page. It’s like the element has been removed.


  4. What are some JavaScript libraries you’ve used?
    DOM: jQuery, Prototype, MooTools, Dojo
    Web Application Frameworks: Meteor.js, Angular.js, React.js, Ember.js
    GUI: Bootstrap, jQuery UI
    See more here.
  5. What do you do when a browser can’t display HTML5?
    You can make a separate view for browsers that can’t render HTML5. You can also add JavaScript elements to display what you need in case HTML5 isn’t rendered.
    Test if a user’s browser has HTML5 capabilities with Modernizr.js (another JavaScript library!).
    Guide to making Internet Explorer display your HTML5 elements with JavaScript.


Want to share your own questions? Leave a comment!

4 thoughts on “Front-End Interview Questions

  1. I recently read about a site called where you can practice for coding interviews. I havent tried it myself since I am still learning. Maybe you can check it out and see if it helps in any way. 😀


  2. Hi! (just found your blog)

    I was wondering how did you react to these questions or to those questions that you don’t know how to answer? I just started out but I feel such a noob that I don’t know how to answer just these 5 questions :/


    • For those 5 questions if I really had no idea then I said ‘I don’t know’. Like with CSS sprites. I hadn’t heard of it before and couldn’t guess the meaning from the context. For the other questions I didn’t know the definitions or main differences but I explained how I’ve used them before. For example, I always use px when specifying sizes in CSS and knew it meant pixels. I remembered a time when I used em to set a font size.

      I’ve been told that the most important thing is to be willing to learn and grow your skill set, so alway find a way to convey that.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s