TechHire NepalConnecting Talent, Building Careers
Find JobsCompaniesCourses
Find Talents
Sign inGet Started →
Find JobsCompaniesCourses
Find Talents
Sign inGet StartedHire Talent
TechHire Nepal

Nepal's #1 tech job platform. Connecting top talent with the best companies.

For Job Seekers

  • Browse Jobs
  • Companies
  • Tech Salaries
  • Interview Prep
  • Courses
  • Career Advice

For Employers

  • Post a Job
  • Talent Search
  • Pricing
  • Employer Dashboard

Company

  • About
  • Blog
  • Careers
  • Contact

Resources

  • Training Institutes
  • Projects
  • Tutorials
  • Roadmaps
  • Notes
  • Open Sources

Community

  • Discussions
  • Tech Events
  • Hackathons
  • Developer Meetups
  • Tech News

More

  • Help & Support
  • Salary Tax Calculator
  • Company Registration Guide
  • Labour Act

Stay in the loop

A weekly digest of the best tech articles and jobs in Nepal.

© 2026 TechHire Nepal. All rights reserved.

Privacy PolicyTerms of ServiceCookie Policy
HomeInterview PrepQuestion bank
Question bank

Interview Questions, Answered Clearly

Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.

Type
TechnicalCodingHR / BehaviouralAll types
Role
All rolesFrontend DeveloperBackend DeveloperFull-Stack DeveloperMobile Developer
Topic
All topicsJavaScript10React7HTML & CSS7PHP & Laravel9SQL & Databases6HTTP & REST APIs6Git4OOP & Design4Flutter5React Native5
Level
AnyEasyMediumHard

5 questions

  • Why they ask this: Shows you care about accessibility and SEO, not only how a page looks.

    Answer

    Semantic HTML uses elements that describe their meaning, not only their appearance: <header>, <nav>, <main>, <article>, <section>, <aside>, <footer>, <button>, <label>, and headings <h1>–<h6> in order.

    Why it matters:

    • Accessibility: screen readers use these landmarks and roles to navigate. A <button> is keyboard-focusable and clickable with Enter or Space by default; a clickable <div> is not.
    • SEO: search engines understand the page structure better.
    • Maintainability: the markup is easier for other developers to read.
    html
    <main>
      <article>
        <h1>Frontend Developer at Kathmandu Tech</h1>
        <p>...</p>
        <button type="button">Apply now</button>
      </article>
    </main>
    Open full page
  • Why they ask this: Layout bugs often come from misunderstanding widths, padding and borders.

    Answer

    Every element is a box made of four layers, from inside out: content → padding → border → margin.

    • With the default box-sizing: content-box, width sets only the content. Padding and border are added on top, so width: 200px; padding: 20px; border: 1px renders 242px wide.
    • With box-sizing: border-box, width includes padding and border, so the element stays 200px wide. This is far easier to reason about.
    css
    *, *::before, *::after {
      box-sizing: border-box;
    }

    Margins are outside the box and can collapse: vertical margins of adjacent block elements combine into the larger of the two instead of adding up.

    Open full page
  • Why they ask this: Checks you can choose the right layout tool instead of fighting CSS.

    Answer

    • Flexbox is one-dimensional: it lays items out in a row or a column. It is great for navbars, toolbars, centring, and spacing items whose size comes from their content.
    • Grid is two-dimensional: rows and columns together. It is great for page layouts, card galleries and dashboards.
    css
    /* Flexbox: navbar */
    .nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
    
    /* Grid: responsive cards */
    .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

    They work well together, for example a Grid page layout with Flexbox inside each card.

    Open full page
  • Why they ask this: Positioning is needed for dropdowns, modals and sticky headers.

    Answer

    • static (default): normal document flow. top/left have no effect.
    • relative: stays in the flow, but can be nudged with top/left. It also becomes the containing block for absolutely positioned children.
    • absolute: removed from the flow and positioned relative to the nearest positioned ancestor (any value other than static), or the initial containing block if there is none.
    • fixed: removed from the flow and positioned relative to the viewport, so it stays put while scrolling. Note that a transform on an ancestor changes this.
    • sticky: acts like relative until a scroll threshold (such as top: 0) is reached, then sticks within its parent.
    css
    .dropdown-wrapper { position: relative; }
    .dropdown-menu { position: absolute; top: 100%; left: 0; }
    .site-header { position: sticky; top: 0; }
    Open full page
  • Why they ask this: Most users in Nepal browse on mobile phones, so responsive design is a must-have skill.

    Answer

    1. Add the viewport meta tag: <meta name="viewport" content="width=device-width, initial-scale=1">.
    2. Design mobile-first: write base styles for small screens, then add min-width media queries for larger ones.
    3. Use flexible layouts (Flexbox, Grid with fr and minmax()) and relative units (%, rem, vw) instead of fixed pixel widths.
    4. Make media fluid: img { max-width: 100%; height: auto; }, and use srcset for different image sizes.
    5. Test on real devices and in the browser DevTools device mode.
    css
    .grid { display: grid; gap: 1rem; }
    
    @media (min-width: 768px) {
      .grid { grid-template-columns: repeat(2, 1fr); }
    }
    Open full page