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!