Join Regular Classroom : Visit ClassroomTech

HTML Interview Questions – Advanced Level | Codewindow.in

1. If I do not put <!DOCTYPE html> will HTML 5 work?

No, the browser will not be able to identify that it is an HTML document and HTML 5 tags do not function properly.

2. What is datalist tag?

The HTML 5 datalist tag provides an autocomplete feature on the form element. It facilitates users to choose the predefined options to the users to select data

<label>    
 Enter your favorite cricket player: Press any character<br />    
 <input type="text" id="favCktPlayer" list="CktPlayers">    
 <datalist id="CktPlayers">    
 <option value="Sachin Tendulkar">    
 <option value="Brian Lara">    
 <option value="Jacques Kallis">     
 <option value="Ricky Ponting">     
 <option value="Rahul Dravid">     
 <option value="Shane Warne">     
 <option value="Rohit Sharma">     
 <option value="Donald Bradman">     
 <option value="Saurav Ganguly ">     
 <option value="AB diVilliers">     
 <option value="Mahendra Singh Dhoni">     
 <option value="Adam Gilchrist">    
 </datalist>    
</label>

3. What are the new form elements introduced in HTML5?

The five new form elements introduced in HTML5 are:
<datalist>: This element allows to display a list of suggestions to a text input element
<meter>: This element is used to point to a numeric value that lies within a range. Value, max, min, high, low, optimum are the attributes of this element.
<output>: This element displays the output text which can be modified via using Script like JavaScript.
<progress>: This form element indicates the amount of work completed, i.e. tells about the progress of a task.
<keygen>: This element passes encrypted data to the server by generating an encryption key. keytype and challenge come under its parameters.

4. Which DOCTYPE is correct for HTML5?

DOCTYPE( Document Type Definition) is a declaration that is done on the top of a webpage. It tells the web browser about the version of markup language being used for writing the webpage. There are three types of DOCTYPE- Strict, Framest and Transitional DOCTYPE. The DOCTYPE for HTML5 is quite efficiently concise as well as case – insensitive.
The correct DOCTYPE declaration for HTML5 is: <!DOCTYPE html>
<!DocTYpe html>, <!dOCtype html>, and <!doctype html>, are some other declarations of DOCTYPE that are supported by HTML5.

5. What is a manifest file in HTML5?

The manifest file is used to list down resources that can be cached. Browsers use this information to make the web page load faster than the first time. There are 3 sections in the manifest file
CACHE Manifest – Files needs to be cached
Network – File never to be cached, always need a network connection.
Fallback – Fallback files in case a page is inaccessible

CACHE MANIFEST
# 2012-06-16 v1.0.0
/style.css
/logo.gif
/main.js
NETWORK:
login.php
FALLBACK:
/html/ /offline.html

C QA

Mostly Asked

DS QA

Mostly Asked

DBMS QA

Mostly Asked

ML QA

Mostly Asked

6. What is difference between HTML and XHTML?

HTML and XHTML has a few differences as below:
HTML stands for Hypertext Markup Language while XHTML stands for Extensible Hypertext Markup Language
The format of HTML is a document file format while for XHTML the file format is a markup file format
In HTML it is not necessary to close tags in the same order as they were opened, but in XHTML it is necessary
In XHTML, it is quite important to write doctype on the top of the file; while in HTML is it not needed
The file name extension used in HTML are .html, .htm.; and the file name extension used in XHTML are .xhtml, .xht, .xml.

7. What is a marquee?

A scrolling text that can go in a specific direction across the screen i.e. left, right, up, or down, automatically. For this you can use the tag <marquee> Text to scroll </marquee>.

8. Is it possible to change the color of the bullet?

To change the color of the bullet, you need to change the text color of the first line in the list. The bullet takes the color from the first line of the list.

9. How can you insert a copyright symbol in HTML webpage?

To insert the copyright symbol you can use the “&#169” as well as “&copy” in the HTML file.

10. How to blink text in HTML?

The HTML <blink> tag stands for a non-standard element that is used to create an enclosed text. It flashes slowly and normally blinks, meaning is light flashing on and off in a regular or intermittent way so samely blinking effect is used very rarely, as it is not eye soothing for users to watch a part of text constantly turning on and off.

11. How to add favicon in HTML?

You can create a .png image and then use f the following snippets between the <head> tags for the static HTML documents:
<link rel=”icon” type=”image/png” href=”/favicon.png”/>
<link rel=”icon” type=”image/png” href=”https://example.com/favicon.png”/>

12. How to create frames in HTML?

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Demp Frames</title>
   </head>
   <frameset rows = "10%,80%,10%">
      <frame name = "top1" src = "/html/top_frame.htm" />
      <frame name = "mainframe" src = "/html/main_frame.htm" />
      <frame name = "bottompart" src = "/html/bottom_frame.htm" />
      <noframes>
         <body>Hey Great Learning</body>
      </noframes>
   </frameset>
</html>

13. What are the significant goals of the HTML5 specification?

These were the target area of the HTML5 specs:
Introduction of new element tags to better structure the web page such as <header> tag.
Forming a standard in cross-browser behavior and support for different devices and platforms
Backward compatible with the older version HTML web pages
Introduction of basic interactive elements without the dependency of plugins such as <video> tag instead of the flash plugin.

14. Explain HTML5 Graphics.

An iframe is used to display a web page within a web page.
Syntax:

<!DOCTYPE HTML>
<html>
 <head>
 </head>
 <body>
   <canvas width="300" height="100" style="border:2px solid;"></canvas>  
 </body>
</html>
SVG - Scalable Vector Graphics are used mostly for diagrams or icons. It follows the XML format.
<!DOCTYPE html>
<html>
 <body>
   <svg width="400" height="110">
     <rect width="300" height="100" style="fill:#FFF;stroke-width:2;stroke:#000" />
   </svg>
 </body>
</html>

15. What are raster images and vector images?

Raster Images – The raster image is defined by the arrangement of pixels in a grid with exactly what color the pixel should be. Few raster file formats include PNG(.png), JPEG(.jpg), etc.
Vector Images – The vector image is defined using algorithms with shape and path definitions that can be used to render the image on-screen written in a similar markup fashion. The file extension is .svg

Categories
Pages
Recent Posts