HTML Interview Questions and Answers
Question - 81 : - What do you understand by web workers?
Answer - 81 : -
The addition of web workers brings multithreading capability to JavaScript. These are scripts running in the background that doesn't necessitate the web page to wait for their completion.
Hence, a user can interact freely with the web page while a web worker runs in the background. In order to achieve parallelism, web workers leverage thread-like message passing.
Question - 82 : - What do you understand by HTML tags? How many tags are required to create a web page in HTML5?
Answer - 82 : - A set of characters enclosed within angular braces (<> or >) that develop a formatted command for a web page is called an HTML tag. General syntax of an HTML5 tag is:
.….
Tags help in sending instructions to the web browser on what to display and how to display. A minimum of 3 tags are required for creating a web page in HTML5:
Question - 83 : - Please explain the various formatting tags in HTML5.
Answer - 83 : -
HTML5 has a total of 12 formatting tags:
- - Used for making the text bold.
- - Used for increasing the font size of the text by one unit.
- Used to display the deleted text.- - Used for making the text italic with added semantics importance.
- - Used to make the text italic.
- - Used for displaying the added text.
- - Used for highlighting the text.
- - Used to decrease the font size of the text by one unit.
- - Used for telling the browser that the text is important.
- - Used for making the text a subscript.
- - Used to make the text a superscript.
- - Used for underlining the text.
Question - 84 : - Explain the
Answer - 84 : - The
Question - 85 : - Explain the various new tags introduced by HTML5 in Media Elements.
Answer - 85 : -
HTML5 introduces the following five new tags in Media Elements:
Question - 86 : - Which tag is used for representing the result of a calculation? Explain its attributes.
Answer - 86 : -
The
- for - Represents the relationship among the elements used in the calculation and the result.
- form - Represents the form(s) the output element belongs to.
- name - Represents a name for the output element.
Question - 87 : - What is new about the relationship between the
Answer - 87 : -
Prior to HTML5, only one
element was used for the heading of the entire webpage. This changed in HTML5, as it specifies that the element represents the top-level heading of a section of the webpage, which can be the page , an , or a
According to the HTML5 specification, each element must at least have one tag.
Question - 88 : - List all the tags removed from the HTML5.
Answer - 88 : -
Following tags were removed in the HTML5:
Question - 89 : - Please explain how to indicate the character set being used by a document in HTML5?
Answer - 89 : -
The character set being used by an HTML5 document is indicated using the charset attribute of a tag inside the element of the HTML5 document:
…
...
…
…
Question - 90 : - What is the correct usage of the following HTML5 semantic elements:
ii)
iii)
iv)
Answer - 90 : -
This HTML5 element is intended to have a self-contained composition, being logically independent and capable to be created outside the web page without losing the concerned meaning. Suitable examples for the element are blog posts, news snippets, and release updates.
ii)
We use the
iii)
This essential HTML5 element contains introductory as well as navigation information about a certain section or the body of a web page. Suitable examples for the element are author name, publication date, number of views, and table of contents.
iv)
Intended for holding content having a common purpose or theme, the element serves as a flexible container in HTML5. The comments section, sharing section, and related articles section are some of the best examples of this HTML5 element.