Question:- What is the difference between Canvas and SVG?
Answer:- Canvas • Resolution dependant • Does not support event handlers • Works well for small-scale rendering applications SVG • Resolution independent • Supports event handlers • Performs better for large-scale rendering applications
Question:- How can page loading time be reduced?
Answer:- There are many factors that affect the page loading time of a website. However, some methods can be implemented to reduce it drastically. They are given below: • Reduction in the image size • Removal of unnecessary widgets • HTTP compression • Reduction in lookups • Minimal redirection and caching
Question:- What is the use of CORS?
Answer:- CORS stands for Cross-origin Resource Sharing. It is a mechanism that allows a variety of resources to be requested at a time from a domain that is outside the current request domain.
Question:- What is the difference between localStorage and sessionStorage objects?
Answer:- localStorage • No expiry is there for stored data • Data is not deleted upon the closure of the window sessionStorage • The object is valid for only a single session • The object is immediately deleted upon closing the window
Question:- What are some of the new features that are introduced in CSS3?
Answer:- CSS3 has brought about a lot of changes, making the overall framework more user-friendly and powerful. Some of the features that were added and are very popularly used now are: • Rounded corners • Animation • Custom layout • Media queries
Question:- What is Responsive Web Design (RWD) in HTML and CSS?
Answer:- Responsive Web Design is a concept that is used to create web pages that can scale across multiple resolutions without any loss of information or screen tearing. It automatically adjusts the structure of the web page based on the device it is viewed on to provide optimal viewing experience.
Question:- What are some of the types of CSS that are used?
Answer:- There are three main types of CSS present: • Inline CSS: Supports the addition of CSS inline, alongside HTML elements • External CSS: Used to import an external CSS file to the HTML document • Embedded CSS: Used to add CSS styles by making use of the < style> attribute
Question:- What is the use of a selector in CSS?
Answer:- A CSS selector is used with a rule in the inline elements, which require styling. With the help of selectors, it is easy to find and select HTML elements based on factors, such as name, ID, attribute, etc.
Question:- Can you give an example of using an ID selector in CSS?
Answer:- The ID selector is used in CSS to point to a target element for usage.
Question:- What is the use of grouping in CSS3?
Answer:- Grouping is used in CSS3 to give users the ability to reuse and apply the same CSS style element to multiple HTML entities, using just one single declaration statement. A simple example of grouping is as shown below: #grouped g, ul { padding-top: 20px; margin: 1; }
Question:- What is the use of a class selector in CSS?
Answer:- Class selectors in CSS begin with a “.” (period) key and are followed by the name of the class. It is used to select a statement and modify the style of that element in the corresponding part of the HTML tag.
Question:- What is the use of Webkit in CSS3?
Answer:- Webkit is an important software component in CSS that allows for the easy rendering of HTML and CSS elements in a variety of browsers, such as Chrome, Firefox, and Safari. There are many engines for browsers such as: • Gecko for Mozilla • Presto for Opera • Edge for Internet Explorer
Question:- What are the uses of child selectors in CSS?
Answer:- Child selectors are primarily used in CSS to look up the ‘child’ component of an element in CSS. Consider an example where the < ul> tag is used in a paragraph. Then, the ul tag becomes a child of the paragraph element.
Question:- How does CSS3 help in implementing rounded borders easily?
Answer:- CSS3 has the property that allows elements to be created with nice-looking rounded corners. This can easily be applied to all four sides or as per requirement. The < border-radius> property has four attributes for four corners: • < border-top-left-radius> • < border-top-right-radius> • < border-bottom-left-radius> • < border-bottom-right-radius>
