Frontend Development

Skill
Web Development

Top 150 Frontend Development Interview Questions and Answers 2025

159 questions found

Updated 25 Nov 2024

Q1. Difference between UI police and client script.

Ans.

UI policy and client script are both used in ServiceNow for controlling field behavior and data on forms.

  • UI policy is used to dynamically change field properties, visibility, and mandatory status based on certain conditions.

  • Client script is used to add custom logic and behavior to forms, such as field validation, calculations, and UI interactions.

  • UI policy is executed on the server side, while client script is executed on the client side.

  • UI policy is defined using a simple dr...read more

View 1 answer
Frequently asked in

Q2. How many windows can be maintained under one page?

Ans.

The number of windows that can be maintained under one page depends on the system's capabilities and resources.

  • The number of windows that can be maintained may vary based on the operating system and hardware specifications.

  • Factors such as memory, processing power, and the type of application being used can also impact the number of windows that can be maintained.

  • For example, a high-end computer with ample resources may be able to maintain multiple windows simultaneously, whil...read more

Add your answer

Q3. What are the ways to handle Errors in React?

Ans.

Error handling in React can be done using try-catch blocks, error boundaries, and handling asynchronous errors.

  • Use try-catch blocks to handle synchronous errors

  • Use error boundaries to catch errors in child components

  • Handle asynchronous errors using promises or async/await

  • Use third-party libraries like Sentry or Bugsnag for better error tracking

  • Display user-friendly error messages to improve user experience

View 1 answer
Frequently asked in

Q4. Create a responsive template using pure CSS(flex, grid, media query) without using any library or framework!

Ans.

Creating a responsive template using pure CSS without any library or framework.

  • Start with a mobile-first approach

  • Use media queries to adjust layout for different screen sizes

  • Utilize flexbox and/or grid for layout and positioning

  • Test on multiple devices and browsers

Add your answer
Are these interview questions helpful?

Q5. How to add style using javascript

Ans.

Styles can be added to HTML elements using JavaScript by manipulating the element's style property.

  • Access the element using document.getElementById() or document.querySelector()

  • Use the style property to set CSS styles, e.g. element.style.color = 'red'

  • Styles can also be set using CSS classes, e.g. element.classList.add('my-class')

Add your answer
Frequently asked in

Q6. How will you modify the layout of webpage using layout.xml

Ans.

Modify webpage layout using layout.xml

  • Layout.xml is a file used in Magento to define the structure of a webpage

  • You can modify the layout of a webpage by editing the layout.xml file

  • Changes in layout.xml can include adding/removing blocks, changing block positions, etc.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q7. How will you separate your business logic, presentation logic, and service logic in angular?

Ans.

Business logic, presentation logic, and service logic can be separated using Angular's component architecture.

  • Create separate components for each logic layer

  • Use services to handle business logic

  • Use pipes for presentation logic

  • Keep components simple and focused on one task

  • Use dependency injection to share services between components

Add your answer

Q8. How do you make responsive web layout?

Ans.

Responsive web layout can be achieved through the use of CSS media queries and flexible grid systems.

  • Use CSS media queries to adjust the layout based on screen size

  • Use flexible grid systems like Bootstrap or Foundation

  • Design with a mobile-first approach

  • Test the layout on multiple devices and screen sizes

Add your answer
Frequently asked in

Frontend Development Jobs

Software Development Engineer I 1-4 years
IBM India Pvt. Limited
4.1
Bangalore / Bengaluru
Application Developer: Experience Front End 5-8 years
IBM India Pvt. Limited
4.1
Bangalore / Bengaluru
Full Stack Python Developer - Web Applications, Mumbai JP Morgan 1-4 years
JPMorgan Chase Bank
4.0
₹ 10 L/yr - ₹ 18 L/yr
Mumbai

Q9. How can you integrate CSS on a web page?

Ans.

CSS can be integrated on a web page by linking an external CSS file, using inline styles, or embedding CSS within the HTML document.

  • Link an external CSS file using the tag in the section of the HTML document.

  • Use inline styles by adding the 'style' attribute to HTML elements.

  • Embed CSS within the HTML document using the

View 2 more answers

Q10. Which current version we are using the bootstrap

Ans.

The current version of Bootstrap is 5.1.0.

  • Bootstrap 5.1.0 is the latest version as of now.

  • It was released on August 19, 2021.

  • Bootstrap 5 is a popular front-end framework for building responsive websites and web applications.

  • It provides a wide range of pre-built components and utilities for faster and easier web development.

  • Some of the key features of Bootstrap 5 include a new grid system, updated form controls, and improved customization options.

Add your answer

Q11. What are the deprecated methods in reactjs 16.8 version?

Ans.

The deprecated methods in ReactJS 16.8 version are findDOMNode and componentWillReceiveProps.

  • findDOMNode method is replaced by useRef hook.

  • componentWillReceiveProps method is replaced by getDerivedStateFromProps.

  • Both methods were causing performance issues and were not recommended to use.

  • React team has provided migration guides to help developers transition to the new methods.

Add your answer

Q12. Tell me about JSX

Ans.

JSX is a syntax extension for JavaScript used with React to describe what the UI should look like.

  • JSX stands for JavaScript XML

  • It allows developers to write HTML-like code in JavaScript

  • JSX elements are transpiled into regular JavaScript function calls

Add your answer

Q13. Have you worked on both backend and frontend development?

Ans.

Yes, I have experience in both backend and frontend development.

  • I have worked on backend development using languages like Java, Python, and Node.js to build APIs and handle server-side logic.

  • I have experience in frontend development using technologies like HTML, CSS, and JavaScript to create user interfaces and interactive web applications.

  • I have used frameworks like React and Angular for frontend development and frameworks like Spring and Express for backend development.

Add your answer

Q14. What is the viewport?

Ans.

The viewport is the visible area of a web page displayed on a device's screen.

  • It determines the layout and dimensions of the content on the screen.

  • It can be adjusted using meta tags in the HTML head section.

  • It is important for responsive design and mobile optimization.

  • It can be simulated in web development tools like Chrome DevTools.

Add your answer

Q15. change all ul element to blue background color using jquery

Ans.

Use jQuery to change the background color of all ul elements to blue.

  • Use the jQuery selector to select all ul elements

  • Use the css() method to change the background color to blue

Add your answer

Q16. Development about backend and front end

Ans.

Backend development focuses on server-side logic and databases, while front end development focuses on user interface and client-side functionality.

  • Backend development involves writing server-side code using languages like Java, Python, or Node.js.

  • Front end development involves creating user interfaces using HTML, CSS, and JavaScript.

  • Backend developers work on databases, APIs, and server-side logic.

  • Front end developers focus on creating visually appealing and interactive user...read more

Add your answer
Frequently asked in

Q17. What are Pure Components in React JS?

Ans.

Pure Components in React JS are components that do not re-render unless their props have changed.

  • Pure Components extend React.Component and implement shouldComponentUpdate method for shallow comparison of props and state.

  • Pure Components are more efficient than regular components as they prevent unnecessary re-renders.

  • Example: class MyComponent extends React.PureComponent { // component code here }

Add your answer
Frequently asked in

Q18. what is css3 ?

Ans.

CSS3 is the latest version of Cascading Style Sheets used for styling web pages.

  • CSS3 introduces new features like animations, transitions, and gradients.

  • It also includes new selectors like :nth-child() and :not().

  • CSS3 supports media queries for responsive design.

  • It has improved support for typography with features like @font-face and text-shadow.

  • CSS3 also includes new layout modules like flexbox and grid.

Add your answer

Q19. How can we adapt the frontend to different view of devices?

Ans.

Responsive design using media queries and flexible layouts to adapt frontend to different devices.

  • Use media queries in CSS to apply different styles based on screen size

  • Utilize responsive frameworks like Bootstrap or Foundation for pre-built responsive components

  • Implement flexible layouts using percentage-based widths and max-width properties

  • Optimize images for different screen resolutions using srcset and sizes attributes

  • Test the frontend on various devices and screen sizes ...read more

Add your answer

Q20. Explanation of props and events

Ans.

Props are used to pass data from parent to child components, while events are used to communicate from child to parent components.

  • Props are read-only and cannot be modified by the child component

  • Events are emitted using $emit() method and can be listened to using v-on directive

  • Props can have default values and can be validated using prop types

  • Events can have arguments passed along with them

Add your answer

Q21. How to handle drop-down

Ans.

To handle drop-down, identify the element, select the option, and verify the selection.

  • Identify the drop-down element using locators like ID, class, or XPath.

  • Use Selenium's Select class to select the desired option.

  • Verify the selection using assertions or by getting the selected option's text.

  • Handle dynamic drop-downs using wait statements or JavaScriptExecutor.

  • Test for edge cases like empty options or duplicate values.

Add your answer
Frequently asked in,

Q22. Explain the concept of Virtual DOM

Ans.

Virtual DOM is a lightweight copy of the actual DOM that allows for efficient updates and rendering in web applications.

  • Virtual DOM is a concept used in frameworks like React to improve performance by minimizing direct manipulation of the actual DOM.

  • When changes are made to the virtual DOM, a comparison is done with the actual DOM to identify the minimal updates needed, reducing re-renders.

  • This approach helps in optimizing rendering speed and improving user experience in web ...read more

Add your answer
Frequently asked in

Q23. Create a page that moves

Ans.

Create a page that moves

  • Use CSS animations or transitions to create movement

  • Consider using JavaScript for more complex animations

  • Experiment with different types of movement such as sliding, fading, or rotating

Add your answer
Frequently asked in

Q24. What is DOM in frontend development?

Ans.

DOM stands for Document Object Model, a programming interface for web documents.

  • DOM is a tree-like structure that represents the HTML elements of a webpage.

  • It allows developers to manipulate the content, structure, and style of a webpage using scripting languages like JavaScript.

  • Changes made to the DOM are reflected in the webpage in real-time.

  • Example: document.getElementById('myElement').style.color = 'red';

Add your answer

Q25. What is window load

Ans.

Window load refers to the time it takes for a webpage to fully load all its content.

  • It is a measure of the time it takes for a webpage to load completely

  • It includes all the resources on the page such as images, scripts, and stylesheets

  • A slow window load time can negatively impact user experience and SEO

  • Tools like Google PageSpeed Insights can be used to analyze and improve window load time

Add your answer

Q26. Do you know or heard about LiveWire or WebPack?

Ans.

Yes, LiveWire and WebPack are both tools commonly used in web development.

  • LiveWire is a full-stack framework for Laravel that allows for building dynamic interfaces using Laravel Blade templates and Alpine.js

  • WebPack is a module bundler for JavaScript applications, helping to manage dependencies and optimize code for production

Add your answer

Q27. How to achieve responsiveness in web page?

Ans.

Achieve responsiveness in web page by using media queries, flexible layouts, and fluid images.

  • Use CSS media queries to apply different styles based on screen size

  • Create flexible layouts using CSS Grid or Flexbox

  • Use relative units like percentages and ems instead of fixed pixels

  • Optimize images for different screen sizes using srcset and sizes attributes

  • Test responsiveness across different devices and browsers

Add your answer

Q28. How to create dynamic page

Ans.

A dynamic page can be created by using HTML, CSS, and JavaScript to add interactive elements and update content dynamically.

  • Use HTML to structure the page and define the content.

  • Apply CSS to style the page and make it visually appealing.

  • Utilize JavaScript to add interactivity and dynamically update the page.

  • Use AJAX or Fetch API to retrieve data from a server without refreshing the page.

  • Implement event listeners to respond to user actions and trigger dynamic changes.

  • Utilize f...read more

Add your answer

Q29. How to manage large data on front end

Ans.

Large data on front end can be managed by implementing pagination, lazy loading, virtual scrolling, and data caching.

  • Implement pagination to display data in smaller chunks, reducing load time and improving performance.

  • Use lazy loading to only load data as needed, reducing initial load time and improving user experience.

  • Implement virtual scrolling to dynamically load and unload data as the user scrolls, improving performance and reducing memory usage.

  • Utilize data caching to st...read more

Add your answer
Frequently asked in

Q30. What is minification

Ans.

Minification is the process of removing unnecessary characters from code without affecting its functionality.

  • Minification reduces file size by removing comments, whitespace, and renaming variables.

  • It helps improve website loading speed and performance.

  • Example: Minified JavaScript code: var x=document.getElementById('demo');x.innerHTML='Hello World';

Add your answer

Q31. What is grid, responsive layout.

Ans.

Grid is a system of horizontal and vertical lines used to structure content. Responsive layout adjusts to different screen sizes.

  • Grid helps to create a consistent and organized layout for web pages.

  • Responsive layout ensures that the website looks good on all devices, from desktops to mobile phones.

  • Grid and responsive layout work together to create a visually appealing and user-friendly website.

  • Examples of responsive design include websites that adjust their layout based on th...read more

Add your answer

Q32. 3.what is reflow

Ans.

Reflow is a process of melting and re-solidifying solder paste to create a permanent bond between components and PCB.

  • Reflow is a critical step in surface mount technology (SMT) assembly.

  • It involves heating the PCB and components to a specific temperature and then cooling them down.

  • The solder paste melts and then re-solidifies, creating a permanent bond between the components and the PCB.

  • There are different types of reflow processes, such as convection, vapor phase, and infrar...read more

Add your answer

Q33. How to get the selected drop down list value

Ans.

To get the selected drop down list value, use the getSelectedValue() method.

  • Use the getSelectedValue() method to get the selected value from the drop down list.

  • Identify the drop down list element using its ID or name.

  • Call the getSelectedValue() method on the identified element.

  • Store the returned value in a variable for further use.

Add your answer

Q34. What is a critical rendering path?

Ans.

The sequence of steps a browser takes to convert HTML, CSS, and JavaScript into a rendered page.

  • Includes parsing HTML, constructing the DOM tree, calculating styles, and executing JavaScript.

  • Optimizing the critical rendering path can improve page load times and user experience.

  • Examples of optimization techniques include minimizing render-blocking resources and using lazy loading.

  • The critical rendering path can vary depending on the browser and device being used.

Add your answer
Frequently asked in

Q35. Create accordion

Ans.

An accordion is a UI component that expands and collapses content sections when clicked.

  • Use HTML, CSS, and JavaScript to create the accordion

  • Each section should have a header and content that can be toggled

  • Utilize event listeners to handle the click event and toggle the visibility of content

Add your answer

Q36. How do you create a hyperlink in razor

Ans.

To create a hyperlink in Razor, use the Html.ActionLink method.

  • Use @Html.ActionLink() method in Razor to create a hyperlink

  • Specify the link text, action method, controller name, and route values as parameters

  • Example: @Html.ActionLink("Click here", "Index", "Home")

Add your answer

Q37. Create a simple drop down menu

Ans.

Create a simple drop down menu using HTML and CSS

  • Use element to define the options in the menu

  • Style the drop down menu using CSS to customize its appearance

Add your answer

Q38. design a navbar for a website

Ans.

A clean and user-friendly navbar design for easy navigation on a website

  • Include important links such as Home, About Us, Services, Contact

  • Use clear and concise labels for each navigation item

  • Consider using dropdown menus for subcategories

  • Ensure the navbar is responsive for different screen sizes

Add your answer

Q39. How to fix cumulative layout shift issues?

Ans.

To fix cumulative layout shift issues, ensure all images and media have dimensions specified in HTML, use CSS aspect ratio boxes, and prioritize loading critical resources.

  • Specify dimensions for all images and media in HTML to prevent layout shifts.

  • Use CSS aspect ratio boxes to reserve space for images before they load.

  • Prioritize loading critical resources to avoid sudden layout changes.

Add your answer
Frequently asked in

Q40. How a particular front end works(based on real time)

Ans.

The front end of a website or application is responsible for the user interface and user experience.

  • The front end is built using HTML, CSS, and JavaScript

  • It communicates with the back end to retrieve and display data

  • Real-time front ends often use technologies like WebSockets or AJAX to update content without refreshing the page

  • Responsive design is important for ensuring the front end works well on different devices

Add your answer

Q41. According to you what are the futuristic skills required for a frontend developer?

Ans.

Futuristic skills for a frontend developer include AI, VR/AR, PWAs, and accessibility.

  • Proficiency in AI and machine learning for creating intelligent interfaces

  • Knowledge of VR/AR for developing immersive experiences

  • Expertise in Progressive Web Apps (PWAs) for building fast and reliable web applications

  • Understanding of accessibility guidelines and techniques for creating inclusive designs

Add your answer

Q42. How do describe v-model?

Ans.

V-model is a software development model that emphasizes the relationship between each phase of development and its corresponding testing phase.

  • V-model is a sequential path of the waterfall model where testing is done in parallel with the development phase.

  • Each phase must be completed before the next phase begins.

  • It involves verification and validation activities at each stage to ensure high-quality software.

  • The V-shaped diagram represents the relationship between each phase o...read more

Add your answer
Frequently asked in

Q43. Securing frontend apps

Ans.

Securing frontend apps involves implementing security measures to protect against common vulnerabilities.

  • Use HTTPS to encrypt data transmitted between the frontend and backend

  • Implement input validation to prevent injection attacks

  • Avoid storing sensitive information in local storage

  • Use Content Security Policy (CSP) to prevent cross-site scripting (XSS) attacks

Add your answer

Q44. A frontend-based problem statement on code sandbox. (in ReactJs)

Ans.

Create a ReactJs frontend-based problem statement on code sandbox.

  • Use ReactJs to create a simple todo list application

  • Implement CRUD operations for adding, editing, and deleting tasks

  • Include features like filtering tasks based on status or priority

Add your answer

Q45. Working of and logic behind Accordian?A scenario where only one accordian should be opened and others closed

Ans.

An accordion is a UI component that allows users to expand and collapse sections of content.

  • An accordion typically consists of multiple sections or panels, with only one panel open at a time.

  • When a panel is clicked, it expands to show its content, while the other panels collapse.

  • This behavior can be achieved using JavaScript or CSS transitions.

  • The logic behind an accordion involves tracking the state of each panel and toggling their visibility.

  • Here's an example of how the log...read more

Add your answer
Frequently asked in

Q46. Assignment to convert psd to html

Ans.

Converting PSD to HTML involves translating a design file into a functional website using HTML, CSS, and possibly JavaScript.

  • Analyze the PSD file to identify design elements and layout

  • Use HTML to structure the content and layout of the website

  • Apply CSS to style the elements according to the design

  • Optimize images and assets for web use

  • Ensure responsiveness for different screen sizes

  • Test the website across browsers and devices

Add your answer

Q47. Front end use technology

Ans.

Front end technologies are used to create the user interface of a website or application.

  • HTML - for structuring content

  • CSS - for styling and layout

  • JavaScript - for interactivity and dynamic content

  • Frameworks like React, Angular, Vue.js are commonly used

  • Responsive design for mobile compatibility

Add your answer

Q48. how do you display different color in atable using css for odd even rows

Ans.

To display different colors in a table using CSS for odd and even rows, you can use the :nth-child() selector.

  • Use the :nth-child(odd) selector to target odd rows and apply a specific color using the background-color property.

  • Use the :nth-child(even) selector to target even rows and apply a different color using the background-color property.

  • For example, you can use CSS code like this: tr:nth-child(odd) { background-color: #f2f2f2; } tr:nth-child(even) { background-color: #fff...read more

Add your answer

Q49. How we embed the javascript in css

Ans.

JavaScript cannot be embedded directly in CSS, but can be used in conjunction with CSS to manipulate styles dynamically.

  • JavaScript can be used to dynamically change CSS properties of elements on a webpage

  • This can be achieved by selecting the element using JavaScript and then modifying its style properties

  • For example, you can change the background color of an element when a button is clicked using JavaScript

Add your answer
Frequently asked in

Q50. Explain useState, useEffect Hooks.

Ans.

useState and useEffect are React Hooks used for managing state and side effects respectively.

  • useState is used to manage state in functional components

  • It returns an array with two elements - the current state value and a function to update the state

  • useEffect is used to manage side effects like fetching data or updating the DOM

  • It takes a function as its argument and runs it after every render

  • useEffect can also take a second argument which is an array of dependencies to control ...read more

Add your answer
Frequently asked in

Q51. How to change CSS through JavaScript code?

Ans.

CSS can be changed through JavaScript by accessing the style property of an element and modifying its CSS properties.

  • Access the element using document.querySelector() or document.getElementById()

  • Use element.style.propertyName to modify the CSS property

  • Alternatively, add or remove CSS classes using element.classList.add() and element.classList.remove()

  • Use CSS variables to dynamically change multiple properties at once

Add your answer

Q52. Implement upload of file using Ajax?

Ans.

Ajax can be used to upload files without refreshing the page.

  • Create a form with file input and submit button.

  • Use FormData object to collect form data.

  • Send data to server using Ajax.

  • Handle file upload on server side.

  • Return response to client and update UI.

Add your answer

Q53. design using HTML/CSS

Ans.

Design a webpage using HTML/CSS

  • Use semantic HTML tags for better accessibility and SEO

  • Create a responsive layout using CSS Grid or Flexbox

  • Apply CSS styling for colors, fonts, and spacing

  • Use media queries for different screen sizes

  • Optimize images for faster loading times

Add your answer

Q54. How to create and use custom directive

Ans.

Custom directives in AngularJS allow you to create reusable components.

  • Create a new directive using the directive() method

  • Specify the directive's behavior using the link() method

  • Use the directive in HTML using its name as an attribute

  • Pass data to the directive using attributes

  • Example:

Add your answer
Frequently asked in

Q55. How to create responsive web page?

Ans.

Responsive web pages can be created by using flexible grids, media queries, and responsive images.

  • Use CSS frameworks like Bootstrap or Foundation

  • Design with mobile-first approach

  • Use relative units like em or rem instead of pixels

  • Use media queries to adjust layout based on screen size

  • Optimize images for different screen sizes

Add your answer

Q56. What is meant by bootstrap grid system?

Ans.

Bootstrap grid system is a responsive grid system that allows developers to create responsive layouts for web pages.

  • Bootstrap grid system is based on a 12-column layout.

  • It uses CSS classes to define the layout structure.

  • Developers can easily create responsive designs by utilizing the grid system.

  • The grid system provides different classes for different screen sizes, such as 'col-sm' for small screens and 'col-lg' for large screens.

  • Example:

    Content

Add your answer

Q57. why weuse react js

Ans.

React JS is a popular JavaScript library for building user interfaces.

  • Allows for reusable components

  • Virtual DOM for efficient updates

  • Declarative syntax for easier development

Add your answer

Q58. What is JSX? Why it is used?

Ans.

JSX is a syntax extension for JavaScript that allows writing HTML elements in JavaScript code.

  • JSX makes it easier to write and manage UI components in React

  • It allows mixing HTML and JavaScript in a single file

  • JSX gets transpiled into regular JavaScript by tools like Babel

Add your answer
Frequently asked in

Q59. Design a frontend application on the case study given.

Ans.

Design a frontend application for a healthcare management system.

  • Include user authentication for healthcare professionals and patients.

  • Implement features for scheduling appointments, viewing medical records, and sending messages.

  • Ensure HIPAA compliance for data security and privacy.

  • Design a user-friendly interface with easy navigation and accessibility.

  • Integrate telemedicine capabilities for virtual consultations.

Add your answer

Q60. What is viewport?

Ans.

Viewport is the visible area of a web page in a web browser.

  • Viewport determines how much content can be seen without scrolling.

  • It is defined by the size of the browser window.

  • Viewport can be adjusted using meta tags in HTML.

  • Responsive web design uses viewport to optimize layout for different devices.

Add your answer

Q61. To design the multiple animated web pages

Ans.

To design multiple animated web pages, use CSS animations, JavaScript libraries like GSAP, and SVG animations.

  • Use CSS animations to create simple animations like transitions, keyframes, and transforms.

  • Utilize JavaScript libraries like GSAP (GreenSock Animation Platform) for more complex animations and interactions.

  • Incorporate SVG animations for scalable and high-quality graphics and animations.

  • Optimize animations for performance by minimizing the use of heavy animations and e...read more

Add your answer

Q62. Responsiveness in website

Ans.

Responsiveness in website refers to the ability of a website to adapt and display properly on different devices and screen sizes.

  • Responsive design uses CSS media queries to adjust the layout and content based on the device.

  • It ensures optimal user experience by providing easy navigation and readability.

  • Responsive websites are mobile-friendly and improve search engine rankings.

  • Examples of responsive design include websites that resize and reposition elements, adjust font sizes,...read more

Add your answer

Q63. Form using ReactJs

Ans.

Creating a form using ReactJs

  • Use controlled components to manage form state

  • Utilize useState hook to store form data

  • Implement onChange event handlers to update form data

  • Use onSubmit event handler to handle form submission

Add your answer

Q64. Converting PSD format into HTML format.

Ans.

Converting PSD to HTML involves slicing the design, coding it using HTML/CSS, and optimizing for web.

  • Slice the PSD design into separate image files

  • Code the design using HTML/CSS

  • Optimize images and code for web performance

  • Use tools like Adobe Dreamweaver or Sublime Text for coding

  • Ensure responsiveness for different devices

Add your answer

Q65. How will you retrieve all the values from the drop down?

Ans.

To retrieve all values from a drop down, we can use the getOptions() method and store the values in an array of strings.

  • Locate the drop down element using any of the locators

  • Create a Select class object by passing the drop down element as a parameter

  • Use the getOptions() method to retrieve all the options from the drop down

  • Store the options in an array of strings

Add your answer
Frequently asked in

Q66. How to select values in Dropdowns

Ans.

To select values in Dropdowns, click on the dropdown menu and choose the desired option from the list.

  • Click on the dropdown menu to open the list of options

  • Scroll or use arrow keys to navigate through the options

  • Click on the desired option to select it

  • Some dropdowns may have a search bar to filter options

Add your answer
Frequently asked in

Q67. How to run a callback function after state change in react.

Ans.

To run a callback function after state change in React, use useEffect hook.

  • Import useEffect hook from 'react'.

  • Use useEffect with dependency array containing the state variable.

  • Pass the callback function as the second argument to useEffect.

  • The callback function will run after every state change.

Add your answer

Q68. how do you develop CSS for different devices

Ans.

To develop CSS for different devices, use media queries, responsive design principles, and testing on various devices.

  • Use media queries to apply different CSS styles based on the device's screen size

  • Follow responsive design principles to ensure the layout adapts to different devices

  • Test the CSS on various devices to ensure compatibility and responsiveness

Add your answer

Q69. How is Two way binding done?

Ans.

Two way binding is a technique used in software development to keep data synchronized between the model and the view.

  • Two way binding allows changes made to the model to be reflected in the view and vice versa.

  • It is commonly used in front-end frameworks like Angular and React.

  • In Angular, two way binding is achieved using [(ngModel)] directive.

  • In React, two way binding can be achieved using state and props.

  • Two way binding can improve user experience by reducing the need for man...read more

Add your answer

Q70. how to get value from ng-getValue=""

Ans.

ng-getValue is not a standard attribute in Angular. It may be a custom directive or a typo.

  • Check if ng-getValue is a custom directive or attribute in your Angular application

  • Verify if it is being used correctly in the HTML template

  • If it is a typo, correct it to the appropriate attribute or directive

Add your answer

Q71. What is responsive website

Ans.

A responsive website is a website that adjusts its layout and content to fit different screen sizes and devices.

  • Uses flexible grids and layouts

  • Uses media queries to adjust styles based on screen size

  • Ensures content is easily readable and accessible on all devices

  • Examples: Amazon, Google, Facebook

Add your answer

Q72. How do you include bootstrap into a html document?

Ans.

To include Bootstrap into an HTML document, link the Bootstrap CSS and JavaScript files in the head section.

  • Download the Bootstrap CSS and JavaScript files from the official website.

  • Place the CSS file link inside the head section using the link tag.

  • Place the JavaScript file link at the end of the body section using the script tag.

  • Ensure the file paths are correct and relative to the HTML document.

Add your answer

Q73. Execute code to create form and send data to child component in react js?

Ans.

Use React to create a form and send data to a child component

  • Create a form component in React

  • Pass data from the form component to the parent component using props

  • Send the data from the parent component to the child component as props

Add your answer
Frequently asked in

Q74. What is jsx ?

Ans.

JSX is a syntax extension for JavaScript that allows writing HTML-like code in React applications.

  • JSX stands for JavaScript XML

  • It allows developers to write HTML-like code directly in their JavaScript files

  • JSX gets transpiled into regular JavaScript by tools like Babel before being rendered by the browser

Add your answer

Q75. change first li element to yellow background color using jquery

Ans.

Use jQuery to change the background color of the first li element to yellow.

  • Use the :first-child selector to select the first li element

  • Use the css() method to change the background color to yellow

Add your answer

Q76. what is html, JavaScript

Ans.

HTML is a markup language used for creating web pages, while JavaScript is a programming language used for adding interactivity to websites.

  • HTML stands for HyperText Markup Language and is used for structuring content on web pages

  • JavaScript is a programming language that allows for dynamic content, animations, and interactive features on websites

  • HTML is used to create the structure of a webpage, while JavaScript is used to add functionality and interactivity

  • Example: <html><he...read more

Add your answer

Q77. Dofferemt ways to prevent rerendering of a child component in react?

Ans.

Prevent rerendering of a child component in React

  • Use shouldComponentUpdate() lifecycle method

  • Use React.memo() to memoize functional components

  • Use PureComponent instead of Component

  • Pass props as a callback function to avoid unnecessary re-renders

  • Use React.PureComponent for class components

  • Use React.memo() for functional components

Add your answer

Q78. What is the box model in css

Ans.

The box model is a concept in CSS that defines how elements are displayed as rectangular boxes with content, padding, borders, and margins.

  • The box model consists of four parts: content, padding, border, and margin.

  • Content is the actual content of the box, such as text or an image.

  • Padding is the space between the content and the border.

  • Border is the line that surrounds the padding and content.

  • Margin is the space between the border and other elements.

  • The box model can be adjust...read more

Add your answer

Q79. Is it possible to create slideshow without using javascript

Ans.

Yes, it is possible to create a slideshow without using JavaScript.

  • Use CSS animations and transitions to create the slideshow.

  • Use HTML and CSS to structure and style the slideshow.

  • Utilize keyframe animations to create the slide transitions.

  • Use radio buttons or checkboxes to control the slideshow navigation.

  • Apply the :target pseudo-class to create a simple slideshow without JavaScript.

Add your answer
Frequently asked in

Q80. What is component, how to share data between component, what is pipe

Ans.

Components are building blocks of Angular applications. Data can be shared between components using input/output properties, services, or state management. Pipes are used for data transformation in templates.

  • Components are reusable, self-contained units of code that define the view and behavior of a part of the application.

  • Data can be shared between components using @Input and @Output properties for parent-child communication, services for cross-component communication, or st...read more

Add your answer
Frequently asked in

Q81. What is responsive webpage

Ans.

A responsive webpage is a webpage that is designed to adapt and display properly on various devices and screen sizes.

  • Uses flexible grids and layouts

  • Utilizes CSS media queries to adjust styles based on screen size

  • Ensures content is readable and accessible on all devices

Add your answer

Q82. How to manage bootstrap default css with your code

Ans.

To manage bootstrap default CSS with your code, you can override or customize the default styles using your own CSS.

  • Use custom CSS classes to override specific styles

  • Modify the Bootstrap variables to customize the default styles

  • Create a separate CSS file to add your own styles and include it after the Bootstrap CSS file

  • Use !important to prioritize your custom styles over Bootstrap styles

Add your answer

Q83. What is the difference between Class and id

Ans.

Class is used to style multiple elements, while id is used to style a single element.

  • Class can be used multiple times in a document, while id should be unique

  • Class is denoted by a period (.), id is denoted by a hash (#)

  • Example: <div class='button'> vs <div id='header'>

Add your answer

Q84. What are HOC in react? Implement a HOC from scratch.

Ans.

HOC (Higher Order Components) in React are functions that take a component and return a new component with additional functionality.

  • HOCs are a common pattern in React for code reuse, logic abstraction, and separation of concerns.

  • They are used to enhance components with additional props, state, or lifecycle methods.

  • Example: Creating a HOC that adds a loading spinner while data is being fetched from an API.

Add your answer

Q85. Explain Flexbox and CSS grid?

Ans.

Flexbox and CSS grid are layout modules in CSS that allow for responsive and flexible web design.

  • Flexbox is a one-dimensional layout system that allows for easy alignment and distribution of elements within a container.

  • CSS grid is a two-dimensional layout system that allows for more complex and flexible layouts.

  • Flexbox is best for arranging items in a single row or column, while CSS grid is best for creating more complex layouts with multiple rows and columns.

  • Both Flexbox and...read more

Add your answer

Q86. how to find the url of current page using javascript

Ans.

Use window.location.href to get the URL of the current page in JavaScript

  • Access the URL using window.location.href

  • Alternatively, use document.URL to get the URL

  • You can also use window.location.toString() to get the URL

Add your answer

Q87. When to use Inline Template vs External Template in Angular?

Ans.

Inline templates are used for small, simple templates, while external templates are used for larger, complex templates.

  • Inline templates are defined within the component's TypeScript file using the template property.

  • External templates are defined in separate HTML files and linked to the component using the templateUrl property.

  • Inline templates are useful for small components or when the template is simple and doesn't require much HTML code.

  • External templates are beneficial for...read more

Add your answer
Frequently asked in

Q88. What is media queries and how can we mangane with bootstrap css

Ans.

Media queries are CSS techniques used to apply different styles based on the characteristics of the device or viewport.

  • Media queries allow us to create responsive designs that adapt to different screen sizes and devices.

  • Bootstrap CSS provides a responsive grid system and predefined media queries to make it easier to create responsive web designs.

  • We can use Bootstrap's CSS classes like 'col-md-6' to define different layouts for different screen sizes.

  • Media queries can be writt...read more

Add your answer

Q89. How many types of JavaScript in HTML

Ans.

There is only one type of JavaScript in HTML, which is client-side JavaScript.

  • Client-side JavaScript is the only type used in HTML.

  • It is used to make web pages interactive and dynamic.

  • Examples include event handling, form validation, and DOM manipulation.

Add your answer
Frequently asked in

Q90. Diff between class based or function based component ?

Ans.

Class-based components are ES6 classes that extend React.Component, while function-based components are functions that return JSX.

  • Class-based components are more feature-rich and have access to lifecycle methods.

  • Function-based components are simpler and easier to read and test.

  • Class-based components can have state and use lifecycle methods like componentDidMount and componentDidUpdate.

  • Function-based components can use React hooks to manage state and lifecycle.

  • Class-based comp...read more

Add your answer
Frequently asked in

Q91. Why we use CSS

Ans.

CSS is used to style and format web pages, making them visually appealing and user-friendly.

  • CSS is used to control the layout, colors, fonts, and overall appearance of a website.

  • It allows for consistent styling across multiple pages of a website.

  • CSS can be used to create responsive designs that adapt to different screen sizes.

  • It helps improve the user experience by making the website visually appealing and easy to navigate.

  • CSS can also be used to create animations and transit...read more

Add your answer

Q92. What is JSX and Babel?

Ans.

JSX is a syntax extension for JavaScript that allows writing HTML-like code within JavaScript. Babel is a tool used to transpile JSX code into plain JavaScript.

  • JSX stands for JavaScript XML and is used to write HTML-like code in React components

  • Babel is a JavaScript compiler that converts JSX code into plain JavaScript for browser compatibility

  • JSX allows developers to write UI components in a more declarative and readable way

  • Example:

    Hello, World!
    in JSX gets transpiled to Re...read more
Add your answer

Q93. Setting up angular project from scratch

Ans.

To set up an Angular project from scratch, follow these steps:

  • Install Node.js and npm

  • Install Angular CLI using npm

  • Create a new project using ng new command

  • Serve the project using ng serve command

  • Start coding your Angular app

Add your answer

Q94. difference between hml and json

Ans.

HTML is a markup language used for creating web pages, while JSON is a data interchange format used for transmitting data between servers and web applications.

  • HTML is used for creating the structure and content of web pages, while JSON is used for transmitting data between servers and web applications.

  • HTML uses tags to define elements on a web page, while JSON uses key-value pairs to represent data.

  • HTML is primarily used for displaying content to users, while JSON is used for...read more

Add your answer

Q95. What is mean by dom

Ans.

DOM stands for Document Object Model, which is a programming interface for web documents.

  • DOM is a representation of the structure of a web page, allowing scripts to dynamically access and update the content, structure, and style of the document.

  • It provides a way for scripts to interact with the web page by accessing and manipulating elements like text, images, forms, etc.

  • DOM is platform and language-independent, allowing developers to use it with any programming language that...read more

Add your answer
Frequently asked in

Q96. What is keys and props in react

Ans.

Keys and props are important concepts in React for managing and passing data between components.

  • Keys are unique identifiers assigned to elements in a list to help React identify which items have changed, are added, or are removed.

  • Props are properties that are passed from parent components to child components to allow data flow and communication between them.

Add your answer

Q97. What is uses of CSS

Ans.

CSS is used for styling and formatting web pages, making them visually appealing and user-friendly.

  • Styling HTML elements

  • Formatting text, images, and layout

  • Creating responsive design for different screen sizes

  • Adding animations and transitions

  • Customizing colors, fonts, and spacing

Add your answer

Q98. how do you target the dynamic element

Ans.

Targeting the dynamic element involves identifying and testing components of the software that are subject to change.

  • Identify areas of the software that are likely to change frequently

  • Use automation tools to target and test dynamic elements

  • Implement robust test strategies to handle dynamic changes

  • Regularly update test cases to accommodate dynamic elements

  • Utilize data-driven testing to handle variations in dynamic elements

Add your answer

Q99. Routing in Angular

Ans.

Routing in Angular allows for navigation between different components and views within an application.

  • Angular's router module provides a way to define routes and their corresponding components.

  • Routes can be configured with path, component, and other properties.

  • RouterOutlet is used to display the component associated with the current route.

  • RouterLink is used to navigate to different routes.

  • Child routes can be defined to create nested navigation.

  • Guards can be used to control ac...read more

Add your answer
Frequently asked in,

Q100. What is CSS? Can you explain it?

Ans.

CSS stands for Cascading Style Sheets, used to style the appearance of web pages.

  • CSS is used to control the layout and design of web pages.

  • It allows for styling elements such as fonts, colors, spacing, and more.

  • CSS can be applied inline, internally within HTML, or externally in a separate file.

  • Selectors are used to target specific elements for styling.

  • Example: h1 { color: blue; } sets the color of all h1 headings to blue.

Add your answer
1
2

Top Interview Questions for Related Skills

Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.3k Interviews
3.9
 • 8k Interviews
3.7
 • 7.5k Interviews
3.7
 • 5.5k Interviews
3.8
 • 5.5k Interviews
3.6
 • 3.8k Interviews
3.8
 • 2.8k Interviews
4.0
 • 256 Interviews
View all
Frontend Development Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter