Prev Next

Web / HTML Interview questions

1. When does a body onLoad gets called/executed?

The load event fires at the end of the document loading process. At this point, all of the objects in the document are in the DOM, and all the images and sub-frames have finished loading.

Read full answer

2. Difference between <div> and <span> element.

<div> is a block level element and it helps to group html elements. <span> is an inline element and it also helps in grouping html elements.

Read full answer

3. How will you disable all the html elements within a HTML Table?

$(' #tableID').find('select,input,textarea').attr('disabled','disabled');

Read full answer

4. How will you enable all the html elements within an html table?

$(' #tableID').find('select,input,textarea').removeAttr('disabled');

Read full answer

5. How to display &lt; and &gt; using html without transforming it to & and >?

Escape the & using &amp;. Change this <h1> < test-Link > </h1> To the below.

Read full answer

6. How do I invert/transpose the rows and columns of a HTML table?

Save the below content into a file with .html extension and open it in browser. <script src= "https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js" ></script> <html> <head> </head> <script> $( document ).ready(function() { $("#tableID").each(function() { var $this = $(this); var newTr

Read full answer

7. HTML 5: How do you find the user's location or position?

The HTML Geolocation API is used to get the geographical position of a user. Since this could possibly compromise user's privacy, the position is not available unless the user approves it....

Read full answer

8. What are the common CSS pseudo classes for formatting links.

Name Description :link . A link that hasn't been visited....

Read full answer

9. What are the properties for removing underlines and borders of link?

text-decoration : To remove the underlining from a link, set this to none. border-style : To remove the border from an image link, set this to none.

Read full answer

«
»

Comments & Discussions