HTML interview questions


Total available count: 25
Subject - Web Development
Subsubject - HTML

How to use Onload function with body tag?

The body Onload function tells the browser to load the call the javascript functionality at the time of loading the web page. This can done in two ways,

1. Calling a function in the body tag Onload function

Example: 

<body onload = "alert('Load this method in body Onload function.');" > </body>

2. Calling through Window.onload function in javascript

Example:

function OnBodyLoad() 
{
  alert("Load this method in body Onload function.");
}
 
window.onload=OnBodyLoad;

 




Next 5 interview question(s)

1
HTML Headings
2
HTML Lists? HTML can have Unordered Lists, Ordered Lists, or Description Lists ?
3
Styling HTML with CSS
4
Use of noscript tag
5
What are Block level elements and inline elements?


Comments