What is a pseudo-class?
It is a CSS technique which sets the style when an element changes its state. E.g. style changes when mouse hover, different styles for visited or unvisited links, etc.
How can you reduce page loading time?
These are the following ways you can reduce web page loading time: reduce image size, remove unnecessary widgets, HTTP compression, placing CSS at the top and script referencing at the bottom or external files, reduce lookups, minimise redirects and caching.
What is CORS?
Cross-Origin Resource Sharing (CORS) is a mechanism that enables different resources on a web page to be requested from another domain outside the domain from which the request originated.
What are the advantages of HTTP 2.0 over HTTP 1.1?
The major advantages are:
♦ Stream prioritization
♦ Binary protocol
♦ Header compression
♦ Server push
What is SEO?
Search Engine Optimization (SEO) is a combination of approaches that makes a website easier to find through search engines like Google and Yahoo. ... Although there are ways of applying SEO at any time throughout the lifecycle of a website, we suggest thinking about SEO from the earliest stages of development.
How do you take into account SEO, maintainability, UX, performance, and security when you’re building a web application?
Explain how you prioritise your actions as per the requirements of the organisation. If your organisation handles vital data, then security will be your top priority. If it is a medium-sized online business, SEO and UX might be your top priority and so on.
What are the new form elements introduced in HTML5?
The new form elements introduced in HTML5 are:
♦ <datalist> – specifies a list of options for input controls.
♦ <keygen> – generates an encryption key.
♦ <output> – defines the result of an expression.
What’s the best way to integrate 5 different stylesheets into a website?
It usually depends on how the site is laid out. However, in most cases combining the stylesheets into single a one is the best approach. You can use Gulp to do so.
What’s the difference between Canvas and SVG?
What is the default border size of a Canvas?
There is no default border size of a Canvas. You can adjust using CSS.
What is the difference between ID and Class selector?
ID selector finds and modifies the style to any single element while Class selector can do to any number of elements.
Which are the new APIs provided by HTML5?
The new APIs are:
♦ media API
♦ text track API
♦ application cache API
♦ data transfer API
♦ user interaction API
♦ command API
♦ constraint validation API
♦ history API
What is the difference between null value and undefined value?
Undefined means a variable has been declared but has not yet been assigned a value. On the other hand, null is an assignment value.
There are three types of pop-up boxes:
♦ Alert – it just displays a message with an OK button.
♦ Confirm – it pops up a confirmation message window with OK and Cancel button.
♦Prompt – it pops up a dialog box asking user input followed confirmation buttons.
The scope defines the accessibility of the functions and variables in an application. There are two types of scopes: local and global.
What is the difference between ‘==’ and ‘===’ operators?
Though both of them belongs to the comparison operator category, the ‘==’ operator checks the value whereas, the ‘===’ operator checks both the value and the type.
Cases when CSS animations work well:
When the transitions are simple. For example, toggling within the element states.
When the UI elements are self-contained. Like in showing a tooltip.
When advanced animation effects are expected in the project, like bouncing, stop pause, etc.
When a superior level of control is required, JS animation works well.
Helpful when drawing in HTML canvas.
What are some development tools you can use?
here are several web development tools available and being into the role of a web developer.
♦ GitHub → to work together with a team on a particular project.
♦ Grunt or Gulp → for automating repetitive tasks.
As a web developer, how do you optimise your site’s loading time?
As a developer, I will optimize the site by –
How is HTML different from XHTML?
HTML and XHTML are both known for writing web pages. But, HTML is extended from SGML tagging whereas XHTML is an application of Extensible Markup Language (XML).
HTML has three components – element tag pair (start tag and end tag), attributes of the element within the tag, and content in the form of both text and graphics. Whereas XHTML includes only a single root element which includes lower case elements and the value that is assigned should be closed, nested, and must be surrounded by quotation marks. Looking at the difference, XHTML is more expressive when compared to HTML.
What do you know about HTTP/3?
HTTP/3 is the new third-generation HTTP standard that was recently made available in late 2019. It is known for its new standards, fast, reliable, and secure connection. HTTP/3 promises faster web experience as it uses QUIC. This new internet transport protocol introduces first-class citizens. Brands like Google and Facebook are now using QUIC because of its swift abilities to speed up the web.
What is Multiplexing in regards to HTTP/2?
The binary framing layer allows HTTP/2 messages to be broken down into independent frames. Multiplexing interleaves the requests or frames, without head-of-line blocking (as seen in HTTP/1.1) and does so over a single TCP connection. Multiple requests can be sent over one connection with responses arriving out of order, eliminating the need to have more than one connection between client and server.
What is Stream prioritization in regards to HTTP/2
Stream prioritization allows developers to allocate dependency levels according to which the streams get delivered to the client. This improves performance by serving only the resources required to render the page. The client constructs a prioritization tree that communicates to the server the order in which it would prefer to receive the responses.
What is Binary protocol in regards to HTTP/2?
HTTP/2 is a binary protocol. Since only binary commands in the form of 0s and 1s are transmitted over the wire, it removes the security issues that come with text-based protocols.
What is Header compression in regards to HTTP/2?
Headers need to be sent only once over the connection in the form of binary codes that are easier to be parsed. Mobile users experience a notable difference in page load times since HTTP/2 provides an optimized web experience.Previous versions of HTTP and SPDY used formats like gzip and DEFLATE that were vulnerable to header compression attacks. HPACK uses static Huffman code to compress headers and is resilient to such attacks providing a more secure environment.
What is Server push in regards to HTTP/2
Instead of waiting for the client to make requests for additional assets, the server intuitively sends the resources that will be required to render the page, thereby avoiding the round trip. The client can either allow or deny the server push.