Question:- What is the float property of CSS?
Answer:- The CSS float property is used to move the image to the right or left along with the texts to be wrapped around it. It doesnt change the property of the elements used before it.
Question:- How to restore the default property value using CSS?
Answer:- In short, there is no easy way to restore to default values to whatever a browser uses. The closest option is to use the initial property value, which restores the default CSS values, rather than the browsers default styles.
Question:- What is the purpose of the z-index and how is it used?
Answer:- The z-index helps to specify the stack order of positioned elements that may overlap one another. The z-index default value is zero and can take on either a positive or negative number. An element with a higher z-index is always stacked above than a lower index. Z-Index can take the following values: - Auto: Sets the stack order equal to its parents. - Number: Orders the stack order. - Initial: Sets this property to its default value (0). - Inherit: Inherits this property from its parent element.
Question:- Explain the difference between visibility: hidden and display: none?
Answer:- visibility: hidden hides the element, but it occupies space and affects the layout of the document.
Question:- What do you understand by W3C?
Answer:- W3C stands for World Wide Web Consortium. Its purpose is to deliver the information of the World Wide Web. It also develops rules and guidelines for the Web.
Question:- What is tweening?
Answer:- It is the process of generating intermediate frames between two images. It gives the impression that the first image has smoothly evolved into the second one. It is an important method used in all types of animations. In CSS3, Transforms (matrix, translate, rotate, scale) module can be used to achieve tweening.
Question:- What is the difference between CSS2 and CSS3?
Answer:- The main difference between CSS2 and CSS3 is that CSS3 is divided into different sections which are also known as modules. Unlike CSS2, CSS3 modules are supported by many browsers.
Question:- What are the features of React?
Answer:- React framework gaining quick popularity as the best framework among web developers. The main features of React are: - JSX - Components - One-way Data Binding - Virtual DOM - Simplicity - Performance
Question:- What are the biggest limitations of React?
Answer:- Following is the list of the biggest limitations of React: - React is just a library. It is not a complete framework. - It has a huge library which takes time to understand. - It may be difficult for the new programmers to understand and code. - React uses inline templating and JSX, which may be difficult and act as a barrier. It also makes the coding complex.
Question:- What is JSX?
Answer:- JSX stands for JavaScript XML. It is a React extension which allows writing JavaScript code that looks similar to HTML. It makes HTML file easy to understand. The JSX file makes the React application robust and boosts its performance. JSX provides you to write XML-like syntax in the same file where you write JavaScript code, and then preprocessor (i.e., transpilers like Babel) transform these expressions into actual JavaScript code. Just like XML/HTML, JSX tags have a tag name, attributes, and children.
Question:- Why cant browsers read JSX?
Answer:- Browsers cannot read JSX directly because they can only understand JavaScript objects, and JSX is not a regular JavaScript object. Thus, we need to transform the JSX file into a JavaScript object using transpilers like Babel and then pass it to the browser.
Question:- Why we use JSX?
Answer:- - It is faster than regular JavaScript because it performs optimization while translating the code to JavaScript. - Instead of separating technologies by putting markup and logic in separate files, React uses components that contain both. - t is type-safe, and most of the errors can be found at compilation time. - It makes easier to create templates.
Question:- What do you understand by Virtual DOM?
Answer:- A Virtual DOM is a lightweight JavaScript object which is an in-memory representation of real DOM. It is an intermediary step between the render function being called and the displaying of elements on the screen. It is similar to a node tree which lists the elements, their attributes, and content as objects and their properties. The render function creates a node tree of the React components and then updates this node tree in response to the mutations in the data model caused by various actions done by the user or by the system.
Question:- Explain the working of Virtual DOM.
Answer:- Virtual DOM works in three steps: 1. Whenever any data changes in the React App, the entire UI is re-rendered in Virtual DOM representation. 2. Now, the difference between the previous DOM representation and the new DOM is calculated. 3. Once the calculations are completed, the real DOM updated with only those things which are changed.
