0% found this document useful (0 votes)
42 views

HSBC Interview

Uploaded by

320506402078
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

HSBC Interview

Uploaded by

320506402078
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

REACT :

1. What is React.js?
React.js is a JavaScript library used for building user interfaces. It allows developers to
create reusable UI components and efficiently update the UI when the data changes.

2. What are the key features of React.js?


React.js offers features like virtual DOM, component-based architecture, one-way
data flow, JSX syntax, and a rich ecosystem of libraries and tools.

3. What is JSX?
JSX (JavaScript XML) is an extension to JavaScript that allows you to write HTML-like
syntax within JavaScript code. It is used to describe the structure and appearance of
React components.

4. What is the significance of the virtual DOM in React.js?


The virtual DOM is a lightweight copy of the actual DOM. React uses the virtual DOM to
optimize and speed up the process of updating the real DOM by comparing the
current virtual DOM with the previous one.

5. What is the difference between a functional component and a class component in


React.js?
Functional components are stateless and are typically written as plain JavaScript
functions. They are simpler and easier to test. Class components, on the other hand,
have a state, can use lifecycle methods, and are written as ES6 classes.

6. What is the purpose of the constructor in a React component?


The constructor is used to initialize the state and bind event handlers in a class
component. It is called before the component is mounted.

7.What are React lifecycle methods?


React lifecycle methods are special methods that are called at specific points in a
component's lifecycle. These methods include componentDidMount,
componentDidUpdate, componentWillUnmount, and many others.

8. What is the useState hook used for?


The useState hook is used to add state to functional components. It returns a stateful
value and a function to update that value. By calling the update function, the
component can trigger a re-render with the updated state.

9. What is the useEffect hook used for?


The useEffect hook is used to perform side effects in functional components. It allows
you to run code after the component has rendered and handle actions such as data
fetching, subscriptions, or manually updating the DOM.
10. What is Redux?
Redux is a predictable state container for JavaScript applications. It provides a
centralized store to manage application state and uses actions and reducers to
modify and update that state in a predictable manner.

11. What is React Native?


React Native is a framework for building native mobile applications using React. It
allows developers to write mobile apps using JavaScript and leverage the power of
React to create reusable UI components.

12. What is the difference between React and React Native?


React is a JavaScript library for building user interfaces, primarily for web
applications, while React Native is a framework for building native mobile
applications. React Native uses native components and APIs specific to each
platform.
13. What is ReactJS?
ReactJS is a JavaScript library used to build reusable components for the view layer in MVC
architecture. It is highly efficient and uses a virtual DOM to render components. It works on the
client side and is written in JSX.
14. Explain the MVC architecture?
The Model-View-Controller (MVC) framework is an architectural/design pattern that separates an
application into three main logical components Model, View, and Controller. Each architectural
component is built to handle specific development aspects of an application. It isolates the
business, logic, and presentation layer from each other

14. Explain the building blocks of React?


The five main building blocks of React are:
Components: These are reusable blocks of code that return HTML.
JSX: It stands for JavaScript and XML and allows to write HTML in React.
Props and State: props are like function parameters and State is similar to variables.
Context: This allows data to be passed through components as props in a hierarchy.
Virtual DOM: It is a lightweight copy of actual DOM which makes DOM manipulation easier.

HTML:

1. What is HTML?
HTML stands for HyperText Markup Language. It is used to design web pages using a markup
language. HTML is a combination of Hypertext and Markup language. Hypertext defines the link
between the web pages. The markup language is used to define the text document within the tag
which defines the structure of web pages. HTML is used to structure the website and is therefore
used for Web Development.

2. What are the various markup languages available?


HTML: Hypertext Markup Language
KML: Key whole Markup Language
MathML: Mathematical Markup Language
SGML: Standard Generalized Markup Language
XHTML: eXtensible Hypertext Markup Language
XML: eXtensible Markup Language
3. What is the difference between HTML and HTML 5?

HTML HTML5

It didn’t support audio and video without the It supports audio and video controls with
use of Flash player support. the use of <audio> and <video> tags.

It uses SQL databases and application


It uses cookies to store temporary data.
cache to store offline data.

Allows JavaScript to run in the background.


Does not allow JavaScript to run in the browser. This is possible due to JS Web worker API
in HTML5.

Vector graphics are possible in HTML with the


Vector graphics is additionally an integral
help of various technologies such as VML,
part of HTML5 like SVG and canvas.
Silver-light, Flash, etc.

It does not allow drag-and-drop effects. It allows drag-and-drop effects.

Not possible to draw shapes like circles, HTML5 allows drawing shapes like circles,
rectangles, triangles, etc. rectangles, triangles, etc.

It is supported by all-new browsers like


It works with all old browsers.
Firefox, Mozilla, Chrome, Safari, etc.

Older versions of HTML are less mobile-friendly. HTML5 language is more mobile-friendly.
HTML HTML5

The doctype declaration is too long and The doctype declaration is quite simple
complicated. and easy.

New elements for web structure like nav,


Elements like nav and header were not present.
header, footer, etc.

Character encoding is long and complicated. Character encoding is simple and easy.

It is almost impossible to get the true


One can track the Geo Location of a user
GeoLocation of users with the help of the
easily by using JS GeoLocation API.
browser.

It can not handle inaccurate syntax. It is capable of handling inaccurate syntax.

Attributes like charset, async, and ping are Attributes of the charset, async, and ping
absent in HTML. are a part of HTML 5.

4. What is !DOCTYPE?
A doctype or document-type declaration is an instruction that tells the web browser about the
markup language in which the current page is written. The doctype is not an element or tag, it
lets the browser know about the version of or standard of HTML or any other markup language
that is being used in the document. The DOCTYPE for HTML5 is case-insensitive and can be
written as shown below:
<!DOCTYPE html>
Please refer to the HTML Doctypes article for a detailed description.
5. What are elements and tags, and what are the differences between them?
HTML Tags: Tags are the starting and ending parts of an HTML element. They begin with <
symbol and end with > symbol. Whatever is written inside < and > are called tags.
Syntax:
<b> </b>
HTML elements: Elements enclose the contents in between the tags. They consist of some kind
of structure or expression. It generally consists of a start tag, content, and an end tag.

6. How to create a link in HTML?


A Link is a connection from one Web resource to another. A link has two ends, An anchor and a
direction. The link starts at the “source” anchor and points to the “destination” anchor, which
may be any Web resource such as an image, a video clip, a sound bite, a program, an HTML
document, or an element within an HTML document.
HTML Link Syntax: Links are specified in HTML using the “a” tag.
<a href="url">Link Text<a>

CSS :
1. What is CSS?
Cascading Style Sheets fondly referred to as CSS, is a simply designed language intended to
simplify the process of making web pages presentable. CSS allows you to apply styles to web
pages. More importantly, CSS enables you to do this independent of the HTML that makes up
each web page.
CSS is easy to learn and understood, but it provides powerful control over the presentation of an
HTML document.
2. Why do we use CSS?
We use CSS because of the following reasons:
CSS saves time: You can write CSS once and reuse the same sheet on multiple HTML pages.
Easy Maintenance: To make a global change simply change the style, and all elements in all the
webpages will be updated automatically.
Search Engines: CSS is considered a clean coding technique, which means search engines won’t
have to struggle to “read” its content.
Superior styles to HTML: CSS has a much wider array of attributes than HTML, so you can give a
far better look to your HTML page in comparison to HTML attributes.
Offline Browsing: CSS can store web applications locally with the help of an offline cache. Using of
this we can view offline websites.
3. What are the advantages of CSS?
CSS plays an important role, by using CSS you simply got to specify a repeated style for an
element once & use it multiple times because CSS will automatically apply the required styles.
The main advantage of CSS is that style is applied consistently across a variety of sites. One
instruction can control several areas which are advantageous.
Web designers need to use a few lines of programming for every page improving site speed.
Cascading sheet not only simplifies website development but also simplifies maintenance as a
change of one line of code affects the whole website and maintenance time.
It is less complex therefore the effort is significantly reduced.
It helps to form spontaneous and consistent changes.
CSS changes are device friendly. With people employing a batch of various range of smart devices
to access websites over the web, there’s a requirement for responsive web design.
It has the power for re-positioning. It helps us to determine the changes within the position of
web elements that are there on the page.
These bandwidth savings are substantial figures of insignificant tags that are indistinct from a
mess of pages.
Easy for the user to customize the online page
It reduces the file transfer size.
4. What are the disadvantages of CSS?
CSS, CSS 1 up to CSS3, result in creating confusion among web browsers.
With CSS, what works with one browser might not always work with another. The web
developers need to test for compatibility, running the program across multiple browsers.
There exists a scarcity of security.
After making the changes we need to confirm the compatibility if they appear. A similar change
affects all the browsers.
The programing language world is complicated for non-developers and beginners. Different levels
of CSS i.e. CSS, CSS 2, CSS 3 are often quite confusing.
Browser compatibility (some style sheets are supported and some are not).
CSS works differently on different browsers. IE and Opera support CSS as different logic.
There might be cross-browser issues while using CSS.
There are multiple levels that create confusion for non-developers and beginners.

5. What is the current version of CSS?


CSS3 is the latest version of CSS.
6. List the CSS Frameworks.
The best CSS frameworks are:
Bootstrap
Foundation
Bulma
UIKit
Semantic UI
Materialize
Pure
Tailwind CSS
7. What is the syntax for CSS?
A CSS style rule consists of a selector, property, and its value. The selector points to the HTML
element where CSS style is to be applied. The CSS property is separated by semicolons.
Syntax:
selector {
Property: value;
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy