APIs Flashcards
What is the difference between SOAP and REST?
SOAP
A Web Development protocol
Works with XML
SOAP cannot use REST
REST
An architectural platform
Works with XML, HTML, and plain text
REST can make use of SOAP
What is the use of a namespace in Web Development?
A namespace is a simple global object that is used to hold methods, properties, and other objects in them. It adds ease of use via modularity, thereby, providing users with the ability to reuse the code and avoid naming conflicts.
What are the newly introduced input types in HTML5?
HTML5 has had multiple revamps in the past years, and the addition of input types has made it very easy to work with. Some of these input types are as follows:
color
date
Datetime-local
email
month
number range
What are the five elements that support media content in HTML5?
There are five main elements in HTML5 that support media:
<audio>
<video>
<source></source>
<embed></embed>
<track></track>
</video></audio>
What is SVG and why is it used?
SVG stands for Scalable Vector Graphics. It is used to display vector-based graphics over the web. The graphical content it can render is based on an XML format. With SVG, the graphical content is of superior quality thereby providing the user with the ability to furnish high-quality images.
What is the use of Canvas in HTML?
Canvas was added onto HTML5 to give users the ability to draw graphics on the go, using JavaScript. There are a variety of methods in <canvas> to allow for the drawing of paths, circles, boxes, images, and more.</canvas>
Next up on this top Web Developer interview questions and answers, let us understand the difference between canvas and SVG.
What is the difference between Canvas and SVG?
Canvas SVG
Resolution dependent Resolution independent
Does not support event handlers Supports event handlers
Works well for small-scale rendering applications Performs better for large-scale rendering applications
How can page loading time be reduced?
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
What is the use of CORS?
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.
The next web application interview question comprises an important difference. Check it out below.
What is the difference between localStorage and sessionStorage objects?
localStorage sessionStorage
No expiry is there for stored data The object is valid for only a single session
Data is not deleted upon the closure of the window The object is immediately deleted upon closing the window
What are some of the new features that are introduced in CSS3?
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
What is Responsive Web Design (RWD) in HTML and CSS?
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.
What are some of the types of CSS that are used?
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</style>
What is the use of a selector in CSS?
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.
Can you give an example of using an ID selector in CSS?
example {padding: 20px;}
The ID selector is used in CSS to point to a target element for usage. It is denoted in the following example:
<p>
...
</p>
What is the use of grouping in CSS3?
grouped g, ul { padding-top: 20px; margin: 1; }
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: