MERN stands for MongoDB, Express, React, Node, after the four key technologies that make up the stack. MERN Stack Interview Part 1.
1. What does a <DOCTYPE html> do?
The DOCTYPE declaration is required for the webpages, It is used to tell user agents what version of the HTML specifications your document respects.
2. What is a self closing tag?
The tags that aren’t required to have specific closing tags are called “self closing” tags.
3. What are optional closing tag?
<p>, <li>, <td>, <tr>, <th>, <html>, <body> etc. don't have to provide end tag. So Whenever browser hits a new tag it automatically ends the previous tag.
4. What is difference between HTML and XHTML?
The Extensible Hypertext Markup Language, or XHTML needs to be well formed, all elements need to be closed and nested correctly otherwise you will return errors. it is more strict than HTML and requires less pre-processing by the browser, which may improve your sites performance.
5. What are the building blocks of HTML5?
Semantics, Multimedia, Device access, Connectivity, 2D/3D graphics and effects, Styling.
6. What are the semantic tags available in html5?
HTML5 semantic tags define the function and the category of your text, simplifying the work for browsers and search engines, as well as developers.
<article> <details> <figure> <figcaption> <header> <footer> <nav> <main> <section> <mark> <time> <summary>
7. What is difference between span tag and div tag?
The primary difference between div and span tag is their default behavior. By default a <div> is a block-level-element which means it will render it on it’s own line with a width of a 100% of the parent element and a <span> is an inline element which means it will render on the same line as the previous element, if it is also an inline element and it’s width will be determined by it’s content.
8. Give some example of block elements and inline elements?
Block Elements <h1>, <p>, <ul>, <ol>, <li>
Inline Elements <span>, <a>, <strong>, <i>, <img>
9. Why you would like to use semantic tag?
It helps search engine to understand what your content is about when rank you properly on search engines. Semantic code tends to improve your placement on search engines, as it is easier for the “search engine spiders” to understand.
10. What are the new form elements in HTML5?
There are four new form elements in the HTML5 forms specification are:
<datalist> <output> <progress> <meter>
MERN Stack Interview Part 1.
Read Also: MERN Stack Interview Questions & Answer Series Part 2