HTML Interview Questions


Q1: What is the meaning of HTML?

Ans: You may know already that HTML is for web pages and web applications. Also, it can help you create static web pages only.

HyperText: A text that contains a link is a hypertext. After clicking on that link, you can go to a new webpage.

Markup language: To apply layout or perform formatting to a text document, the markup language is used. It can make your text look more interactive and dynamic. You can change text into images, tables, links, etc.

Web Page: To translate a web page with HTML, a web browser is used. There are two types of Web pages: static and dynamic type.

Q2: Cite the features of HTML?

Ans: It is straightforward language. It is easy to modify and understand for the user. It is a hassle-free way to form a useful presentation with HTML. As it has many formatting tags, it is easy to work with it. Being a markup language, it is a versatile way to create web pages along with the text. It makes it easy for the programmers to place a link on the web pages. Hence, it is quite exciting to use for the users who are into browsing. Plus, you don’t need a platform as it shows on various platforms, such as Windows, etc.

Q3: What are the important goals of the HTML5 specification?

Ans: The HTML5 specs focus on five main areas. For better interaction and usage with the browser, it is suggested by many users.

  • First thing first, it introduces many new element tags. These tags facilitate the better structure of the web page. You can take the < header > tag as an example of this.
  • It sets a standard in cross-browser behavior (performance in different browser environments). It supports different devices and platforms too.
  • Even though it is a newer version, it is still compatible with the former version of HTML web pages.
  • It introduces interactive elements. You don’t have to depend on plugins. For instance, the < video > tag in place of the flash plugin.

Q4: How web storage works in HTML5.

Ans: This web storage in HTML5 works like any basic storage in a program. Basically, it saves the data, so the browser doesn’t have to get it from the server. When the static data is present in your local storage, your browser delivers it without any difficulty. Like every other storage, it has a limitation too. You can store files up to a certain size and this is based on the browser you are using. This reduces the load time and provides an uninterrupted user experience. To store the data locally, two types of web storage are used: local and session storage.

Q5: What makes the drag-and-drop functionality in HTML5 significant?

Ans: Here, you can find the method to make an image draggable in HTML5. The drag and drop functionality is a user-friendly technique for selecting the local files. In addition to that, it somehow resembles the majority of the OS that contain functionality. Because of that, for the user, it becomes very simple to understand the files and the ways to work with them. Prior to the native drag and drop API, this was doable through typing the complicated Javascript programming or the external frameworks.