After clicking on a link, your main browser window spawns a small new window and writes some text on it. When both the window page sources are viewed, the small window page source seems identical t...
The function writing to the new window did not close the document stream 0.0%
Windows receive the source code of the window that wrote to them 0.0%
Since the new window has no filename, it receives the source code of its parent 100.0%
None of the above 0.0%
An HTML form has 10 checkboxes which are all named "chkItems". Which JavaScript function can be used for checking all the checkboxes together?
function CheckAll() { for (z = 0; z < document.forms.chkItems.length; z++) { document.forms.chkItems[z].checked=true } } 0.0%
function CheckAll() { for (z = 0; z < document.forms[0].chkItems.length; z++) { document.forms[0].chkItems[z].checked=true } } 0.0%
function CheckAll() { for (z = 0; z < document.forms[0].chkItems.length; z++) { document.forms[0].chkItems.list[z].checked=true } } 100.0%
function CheckAll() { for (z = 0; z < document.forms[0].chkItems.length; z++) { document.forms[0].chkItems.list[z].checked=false } } 0.0%
Choose another way to write x ? a = b : a = c
if ('x') { a = b; } else { a = c; } 50.0%
if (x) { a = c; } else { a = b; } 0.0%
x : a = c ? a = b 0.0%
None of the above 50.0%
Consider an HTML form with a checkbox and a text field. When data is entered and the Enter key is pressed, the data seems to be lost before the user can click on the button that calls the processin...
Add a TYPE=HIDDEN INPUT to the form 0.0%
Trap the Enter keypress and return (null) 0.0%
Add 'return false' to onsubmit="..." in the FORM tag 100.0%
Instruct the user not to press the Enter key 0.0%
Modify the ENCTYPE property of the form 0.0%
Consider the following validate function: <script type="text/javascript"> function ValidateField() { if(document.forms[0].txtId.value =="") {return false;} return ...
<input name=txtId type="text" onreset="return ValidateField()"> 0.0%
<input name=txtId type="text" onfocus="return ValidateField()"> 0.0%
<input name=txtId type="text" onsubmit="return ValidateField()"> 0.0%
<input name=txtId type="text" onblur="return ValidateField()"> 100.0%
Consider the three variables: someText = 'JavaScript1.2'; pattern = /(w+)(d).(d)/i; outCome = pattern.exec(someText); What does pattern.ignoreCase contain?
true 100.0%
false 0.0%
undefined 0.0%
null 0.0%
0 0.0%
DHTML is a standard defined by the World Wide Web Consortium.
DHTML uses a combination of:
HTML 0.0%
A scripting language 0.0%
Cascading style sheets 0.0%
All of the above 100.0%
Following is a sample CSS style: 1. p 2. ( 3. font-family:arial 4. color:black 5. text-align:left 6. ); What are the corrections required in this style?
The style definition should be enclosed in curly braces 0.0%
Multiple items within a style should be separated by ";" 0.0%
The style should not close with a semicolon 0.0%
All of the above 100.0%
For making the text transparent, the mask filter can be used like:
mask(color=#ff00ff) 0.0%
mask(color=#ffffff) 100.0%
mask(#ffffff) 0.0%
mask(#ff00ff) 0.0%
Given below is a window.open function: window.open(url,name,"attributes") How will you ensure that different URLs open in the same window?
By keeping the second attribute name same 100.0%
By nullifying the name attribute 0.0%
By omitting the name attribute 0.0%
None of the above 0.0%
How can you change the image position from relative to absolute if the image id is "ERImage"?
document.getElementById('ERImage').position="absolute" 0%
document.getElementById('ERImage').setAttribute(position, "absolute") 0%
document.getElementById('ERImage').style.position="absolute;" 0%
document.getElementById('ERImage').style.position="absolute" 0%
How can you use a timer with a function called rearrange()?
tmr=setTimeout("rearrange()",1) 0%
tmr=Timer(1,"rearrange()") 0%
tmr=Timer("rearrange()",1) 0%
tmr=setTimeout(1,"rearrange()") 0%
How is the following code useful? function validate(field) { var valid="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var ok="yes"; var temp; for(var i=0; i < field.value.length; i++) { ...
It will force a user to enter only numeric values 0%
It will force a user to enter only alphanumeric values 0%
It will force a user to enter only character values 0%
None of the above 0%
How will you change the color of the paragraph text to blue on placing the mouse over the paragraph, and reset it back when the mouse leaves the paragraph?
<p onmouseover="style.color='black'" onmouseout="style.color='blue'"> The text of the paragraph..</p> 0%
<p onmouseover="style.color='blue'" onmouseout="style.color='black'"> The text of the paragraph..</p> 0%
<p onmouseout="style.color='blue'"> The text of the paragraph..</p> 0%
<p onmouseover="style.color='blue'"> The text of the paragraph..</p> 0%
How will you display text as a superscript?
vertical-align: super 0%
vertical-align: superscript 0%
vertical-align: top 0%
text-align: super 0%
text-align: superscript 0%
How would you change the image position from absolute to relative, if the image id is "ERImage"?
document.getElementById('ERImage').position="relative" 0%
document.getElementById('ERImage').setAttribute("position", "relative") 0%
document.getElementById('ERImage').style.position="rel" 0%
document.getElementById('ERImage').style.position="relative" 0%
How would you create a popup window that closes after n seconds?
You cannot program a window to close automatically after n seconds. The user will have to manually close it 0%
You would use the setTimeout function 0%
You would use the exit function of the window object 0%
You would use the terminate function 0%
None of the above 0%
How would you double the image size of an Image on a mouseover event, if the original width and height are 100px and id is logo?
document.getElementById('logo').style.width="200" document.getElementById('logo').style.height="200" 100.0%
document.getElementById('logo').style.width="100" document.getElementById('logo').style.height="100" 0.0%
document.getElementById('logo').width="200" document.getElementById('logo').height="200" 0.0%
document.getElementById('logo').width="200px" document.getElementById('logo').height="200px" 0.0%
How would you randomly choose an element from an array named myStuff if the number of elements changes dynamically?
randomElement = myStuff[Math.floor(Math.random() * myStuff.length)]; 0%
randomElement = myStuff[Math.ceil(Math.random() * myStuff.length)]; 0%
randomElement = myStuff[Math.random(myStuff.length)]; 0%
randomElement = myStuff[Math.ceil(Math.random()*myStuff.length - 1)]; 0%
How would you reduce the image size to half of the original, on an mouseover event, if the original width and height are 100px and the id is logo?
document.getElementById('logo').style.width="50" document.getElementById('logo').style.height="50" 0%
document.getElementById('logo').style.width="100" document.getElementById('logo').style.height="100" 0%
document.getElementById('logo').width="50" document.getElementById('logo').height="50" 0%
document.getElementById('logo').width="100" document.getElementById('logo').height="100" 0%
How would you test whether or not a browser window is open?
By using the isOpen method of the window object reference variable 0%
By using the closed property of the window object reference variable 0%
By using the open method of the document object 0%
None of the above 0%
If an image is placed styled with z-index=-1 and a text paragraph is overlapped with it. Which one will come on top?
paragraph 0%
image 0%
any of the above 0%
Is the following statement correct? The width of an element must be set for making filters work.
Sliding menus can be made using DHTML?
The anchor tag is defined as follows: <a href="http://expertrating.com">expertrating</a> Which of the following styles will increase the spacing between letters on mouseover?
a:hover { spacing: 1px;} 0%
a:hover { spacing: 2px;} 0%
a:hover { letter-spacing: 0;} 0%
a:hover { letter-spacing: 2px;} 0%
The anchor tag is defined as follows: <a href="http://expertrating.com">expertrating</a> Which of the following styles will make convert this to capital letters on mouseover?
a:hover { text:ucase;} 0%
a:hover { text-style:uppercase;} 0%
a:hover { text-transform:uppercase;} 0%
a:hover { text-style:upper;} 0%
The following code snippet is used in form validation, the validate function is supposed to return a true if all validations are successful and false if the validation fails. However, the data is a...
There is no error, the code is fine 0%
There should be a return statement before the call to the validate function 0%
onsubmit="validate()" should be replaced with "javascript:validate()" 0%
The following statements show two ways of calling a JavaScript function: i)onclick = "a()" ii)onclick="javascript:a()" a() refers to a function written in JavaScript. Which of the following stat...
There is no difference between the two statements 0%
The first statement is incorrect and the second one is correct 0%
The form tag is defined as follows: <form onsubmit="return Validate()" action="http://www.mysite.com/"> How will you implement the Validate() function that will stop the form from being submitted...
<script type="text/javascript"> function Validate() { if(document.forms[0].name.value == "") return true; else return false; } </script> 0%
<script type="text/javascript"> function Validate() { if(document.forms[0].name.value == "") return false; else return true; } </script> 0%
<script type="text/javascript"> function Validate() { if(document.forms[0].name== "") return false; else return true; } </script> 0%
<script type="text/javascript"> function Validate() { if(document.forms[0].name == "") return true; else return false; } </script> 0%
The width of H1 is defined as follows: H1 {width:100px;} How can you make the heading flip horizontally?
<h1 filter(flip)>Heading</h1> 0%
<h1 style="filter::fliph()">Heading</h1> 0%
<h1 style="filter:fliph()">Heading</h1> 0%
<h1 style="FliphFilter()">Heading</h1> 0%
The width of h3 is defined as follow: H3 {width:100%;} How can you make the heading glow?
<h3 filter(glow)>Heading</h3> 0%
<h3 style="filter:glow()">Heading </h3> 0%
<h3 style="filter::glow()">Heading </h3> 0%
<h3 style="GlowFilter()">Heading </h3> 0%
The width of h3 is defined as follows: H3 {width:90%;} How can you make the heading flip vertically?
<h3 filter(flip)>Heading</h3> 0%
<h3 style="filter:flipv()">Heading </h3> 0%
<h3 style="filter::flipv()">Heading </h3> 0%
<h3 style="FlipvFilter()">Heading </h3> 0%
The width of the h4 is defined as follow: H4 {width:80%;} How can you make the heading drop shadow?
<h4 filter(shadowdrop)>Heading</h4> 0%
<h4 style="filter:shadowdrop()">Heading </h4> 0%
<h4 style="filter:DropShadow()">Heading </h4> 0%
<h4 style="DropShadow ()">Heading </h4> 0%
<h4 filter(dropshadow)>Heading</h4> 0%
<h4 style="filter::shadowdrop()">Heading </h4> 0%
The width of the h4 is defined as follow: H4 {width:95%;} How can you make the heading blur?
<h4 filter(blur)>Heading</h42> 0%
<h4 style="filter:blur()">Heading </h4> 0%
<h4 style="filter::blur()">Heading </h4> 0%
<h4 style="Blur()">Heading </h4> 0%
This is a JavaScript function for changing the color of the text box named "txtName": function SetColor(col) { document.forms[0].txtName.style.background=col } How will you change the color of th...
<input type="text" onkeydown="SetColor('white')" onkeyup="SetColor('green')" name="txtName"> 0%
<input type="text" onkeydown="SetColor('green')" onkeyup="SetColor('white')" name="txtName"> 0%
<input type="text" onkeydown="SetColor('green')" name="txtName"> 0%
<input type="text" onkeydown="SetColor('white')" name="txtName"> 0%
What does the following code snippet do? <input type="radio" name="r1" value="radio1" onclick="this.checked=false;alert('sorry')">
The code is incorrect 0%
The code makes it necessary for the user to select the radio button 0%
The code disables the radio button 0%
The code displays an alert when the user selects the button 0%
What is the default value for overflow property?
scroll 0%
visible 0%
hidden 0%
auto 0%
What is the default value for z-index?
-1 0%
1 0%
0 0%
null 0%
auto 0%
What is the error in the statement var charConvert = toCharCode('x')?
toCharCode() is a bogus method 0%
Nothing. It will work fine 0%
toCharCode accepts only numbers 0%
toCharCode takes no arguments 0%
What will the following code snippet do? <form onreset="alert('Please again fill the form')">
It validates the contents of the form 0%
It prompts the user not to leave the fields of the form empty 0%
It prompts the user to fill the form once the form is cleared 0%
None of the above 0%
When does the load event of the browser occur?
When the browser receives the page header information 0%
When the browser starts displaying the content 0%
When the browser receives all the page information, including framesets 0%
When the browser receives all the page information, including framesets and displays it 0%
None of the above 0%
Which code will be useful for disabling the right click event in Internet Explorer?
event.button == 2 0%
event.button == 4 0%
event.click == 2 0%
event.click == 4 0%
Which of the following can you use to accept user input?
The prompt method 0%
The alert method 0%
A form field 0%
The confirm method 0%
Which of the following code snippets is more efficient and why? <script language="javascript"> for(i=0;i<document.images.length;i++) document.images[i].src="blank.gif"; </script> ...
Both are equally efficient 0%
The first code is more efficient as it contains less coding 0%
The first code is more efficient as it employs object caching 0%
The second code is more efficient as it employs object caching 0%
Which of the following enables JavaScript Document Object Model to provide access to the HTTP header?
document.GetHeader() 0%
document.getId('header') 0%
document.getElementByName('header') 0%
document.getElementById('header') 0%
You cannot read the HTTP header information using JavaScript 0%
Which of the following event would execute a script once a web page has completely loaded all content?
OnLoad 0%
OnKeyPress 0%
OnKeyUp 0%
onClick 0%
Which of the following helps you create hyperlinks without an underline?
a{text-decoration:none} 0%
a{text-decoration:noline} 0%
a{text-decoration:hide} 0%
a{text-decoration:invisible} 0%
a{ font-style: normal;} 0%
a{font-style: none;} 0%
Which of the following helps you highlight some of the running text on a web page?
<span style="background-color:yellow"> 0%
<span style="background-highlight:yellow"> 0%
<span style="background:yellow"> 0%
<span style="highlight-color:yellow"> 0%
Which of the following helps you import a style sheet named "ssa.css" in the web page?
<a link="stylesheet" url="ssa.css"> 0%
<link rel="stylesheet" type="text/css" href="ssa.css"> 0%
<style name="stylesheet" url="ssa.css"> 0%
<link item="stylesheet" type="text/css" href="ssa.css"> 0%
Which of the following in-built functions is useful when you want to access a form element using its id?
getItem(id) 0%
getFormElement(id) 0%
getElementById(id) 0%
All of the above 0%
Which of the following is an important parameter of the wave filter?
WaveSize 0%
Wavelength 0%
Strength 0%
All of the above 0%
Which of the following is not a CSS filter?
alpha 0%
beta 0%
xray 0%
invert 0%
Which of the following is not a JavaScript event?
onabort 0%
onchange 0%
onupdate 0%
onkeydown 0%
Which of the following is not considered a part of DHTML?
JavaScript 0%
CSS 0%
HTML 0%
VBScript 0%
All are part of DHTML 0%
Which of the following is true?
If onKeyDown returns false, the key-press event is cancelled 0%
If onKeyPress returns false, the key-down event is cancelled 0%
If onKeyDown returns false, the key-up event is cancelled 0%
If onKeyPress returns false, the key-up event is cancelled 0%
Which of the following is used to display an image behind the paragraph text?
set negative z-index for the image 0%
set positive z-index for the image 0%
set negative z-index for the paragraph 0%
set positive z-index for the paragraph 0%
set z-index=0 for the paragraph 0%
set z-index=0 for the image 0%
Which of the following properties is used to redirect a visitor to another page?
document.URL 0%
window.location.href 0%
document.location.href 0%
link.href 0%
window.location 0%
Which of the following properties of JavaScript is used to store the extra values for DHTML tricks?
DHTML 0%
HTML 0%
innerHTML 0%
outerHTML 0%
Which of the following statements is incorrect with regard to a style sheet?
Style sheet defines how an HTML element will be displayed 0%
Internal and external style sheets cannot be used together 0%
Multiple style definitions will cascade into one 0%
Same style sheets can be used by many HTML pages 0%
Which of the following statements is true with regard to setTimeout()?
The statement(s) it executes run(s) only once 0%
It pauses the script in which it is called 0%
clearTimeout() does not stop its execution 0%
It is required in every JavaScript function 0%
Which of the following statements with regard to CSS is correct?
The positioning can be absolute, relative, or dynamic 0%
The float property for text/image can be left, right, or center 0%
The values for visibility can be true or false 0%
The display property sets how an element is displayed 0%
Which of the following style properties is used to display only a part of an image?
snap 0%
clip 0%
scroll 0%
visible 0%
overflow 0%
size 0%
Which of the following will you use for changing the color of a button with id=btn, to green on a mouseover event?
btn.color="green" 0%
document.getElementById('btn').color="green" 0%
document.getElementById('btn').style.color="black" 0%
document.getElementById('btn').style.color="green" 0%
Which of the following will you use for changing the color of the textbox text with id=txtLocation to blue, on a mouseover event?
txtLocation.color="blue" 0%
document.getElementById('txtLocation').color="blue" 0%
document.getElementById('txtLocation').style.color="black" 0%
document.getElementById('txtLocation').style.color="blue" 0%
Which of the options is true for the following style, if h2 and h3 will be positioned on the top of each other? h2{z-index:1;} h3{z-index:2;}
h2 will be on the top of h3 0%
h3 will be on the top of h2 0%
h3 will be on the right of h2 0%
h2 will be on the right of h3 0%
While coding a loop, you come across a condition where you have to ignore the rest of the statements and continue with the beginning of the loop. Which of the following statements would you use?
exit 0%
return 0%
continue 0%
while 0%
break 0%
You are collecting the user's details on a webpage form. The id has to be repeated twice on the form, but you want the user to fill it once only. If the name of the first id is id1 and the second (...
document.forms[0].id1.value=document.forms[0].id2.value 0%
document.forms[0].id2.value=document.forms[0].id1.value 0%
document.id1.value=document.id2.value 0%
document.id2.value=document.id1.value 0%
You are designing a web site and need to set the background image for all the web pages. You want a small background image to repeat and fill up the whole background. Which of the following body st...
body { background: url(/images/bg.gif); repeat: repeat-x } 0%
body { background: url(/images/bg.gif); repeat: repeat-y } 0%
body { background-image: url(/images/bg.gif); background-repeat: no-repeat } 0%
body { background-image: url(/images/bg.gif);} 0%
You are developing a website for children. You want to format the borders of big <td> cells (as mentioned below) for some fun game: Left Border:double Right Border:dashed Top Border:dotted Bottom ...
border-style:double dotted dashed solid 0%
border-style:dotted dashed solid double 0%
border-style:dashed double solid dotted 0%
border-style:solid double dotted dashed 0%
You are developing an application and there is a possibility of certain users using older browser versions. You want to hide the JavaScript code in the browsers that do not support JavaScript. How ...
Precede the JavaScript statements with // 0%
Precede the JavaScript statements with -- 0%
Enclose the statements with /* and */ 0%
Use the following notation: <script language="javascript"> <!-- //--> </script> 0%
Add a <noscript> tag after the script 0%
You are formatting your error messages using the following inline style definition: <span class="error" style="color: red">Error message.</span> Now you want the error message text to be displaye...
span.error{color: blue;} 0%
span.error{ color: blue !important;} 0%
span.error{ color: blue !inherit;} 0%
It is impossible. Inline styles always override imported styles 0%
You are required to create a web page in which hyperlinked sub-headings are displayed. On clicking a link, the contents should get displayed dynamically. Which of the following style attributes wou...
visibility:hidden; 0%
visibility:display; 0%
visibility:visible; 0%
visibility:none; 0%
You are setting cookies with JavaScript. What happens to cookies.txt data if the file exceeds the maximum size?
Your script automatically generates a run-time error 0%
Your script automatically generates a load-time error 0%
The file is truncated to the maximum length 0%
None of the above 0%
You declared an array as follows: var arr; What value would JavaScript assign to an uninitialized element of this array?
NaN 0%
null 0%
undefined 0%
false 0%
0 0%
You defined two styles as follows: td.right {text-align: right} td.left {text-align: center} Which of the following is the right way of calling them in an HTML page?
<td class="td.right">Some Text</td> 0%
<td class="right" class="left">Some Text</td> 0%
<td class="td.left" class="td.right">Some Text</td> 0%
<td class="right">Some Text</td> 0%
You developed a web page using HTML and style sheets. You defined H4 style in the head tag, imported style sheet, as well as inline. Which of the following style definitions is used when the page i...
Default browser H4 definition 0%
External style sheet definition 0%
Inline style definition 0%
Style definition in the head tag 0%
You do not want the end user to see the JavaScript code embedded in the HTML file when the user views the source of the HTML page. Which of the following helps you achieve this?
This is not possible 0%
Use externally linked files which hold the JavaScript code 0%
Modify the headers of the page 0%
Change the MIME type of the page 0%
You have a button definition as given below: <input class="a" type="button" value="Calculate"> To load an image "Img2.jpg" as the background of the button on a mouseover event, you can use:
event.srcElement.style.backgroundImage="Img2.jpg" 0%
event.srcElement.style.Image="Img2.jpg" 0%
event.srcElement.style.backgroundImage="url('Img2.jpg')" 0%
event.srcElement.style.Image="url('Img2.jpg')" 0%
You have a function to change the image with id imageID at runtime: function changeimg(givenImg) { document.getElementById('imageID').src=givenImg } How would you make the webpage display "image2...
<img id="imageID" src="image1.gif" width="50" height="60" onmousedown="changeimg(image1.gif)" onmouseup="changeimg(image2.gif)"> 0%
<img id="imageID" src="image1.gif" width="50" height="60" onmousedown="changeimg(image2.gif)" onmouseup="changeimg(image1.gif)"> 0%
<img id="imageID" src="image2.gif" width="50" height="60" onmousedown="changeimg(image1.gif)" onmouseup="changeimg(image2.gif)"> 0%
<img id="imageID" src="image2.gif" width="50" height="60" onmousedown="changeimg(image2.gif)" onmouseup="changeimg(image1.gif)"> 0%
You have created an object. How can you add a property to the object class?
With the prototype() method 0%
With the prototype property 0%
It cannot be done 0%
With the this object 0%
You have defined an image tag as follows: <img id="ERImage" width="100" height="100" onmouseover="ImageChange()" src="Image1.jpg"> How would you implement ImageChange() function, if the new image...
document.getElementById('ERImage').src="Image1.jpg" 0%
document.getElementById('ERImage').src="Image2.jpg" 0%
document.getElementById('ERImage').style.src="Image1.jpg" 0%
document.getElementById('ERImage').style.src="Image2.jpg" 0%
You have embedded the document.write() method to write some text within a pair of <TD></TD> table tags. On loading the file, you get some garbled junk on the page that should contain the text. What...
The browser does not support JavaScript 0%
You are using an outdated version of the browser 0%
The browser does not support cookies 0%
None of the above 0%
You have this image definition: <img id="logo" src="companylogo1.gif" height="12" width="12" > Which of the following would be helpful for changing the image to "companylogo2.gif" on page load?
logo.source="companylogo2.gif" 0%
logo.source="companylogo1.gif" 0%
document.getElementById('logo').src="companylogo1.gif" 0%
document.getElementById('logo').src="companylogo2.gif" 0%
You have two images of buttons, one bright and the other one dull. You want to change the dull image into a bright one. Which of the following attributes would you use with the img tag?
onmousedown="this.src='bright.gif'" onmouseup="this.src='dull.gif'" 0%
onmousedown="bright.gif" onmouseup="dull.gif" 0%
onmouseup="this.src='bright.gif'" onmousedown="this.src='dull.gif'" 0%
You want to delete an element from an options array. How would you do it?
Set it to false 0%
Set it to null 0%
Set it to undefined 0%
Set it to -1 0%
Set it to 0 0%
Set it to 1 0%
You want to disable the selection of text on the webpage. While trying to select some text, the user should see 'not-allowed' cursor. Which of the following helps you implement this by using JavaSc...
<body onSelectEnd="this.style.cursor='not-allowed'; return true;" onMouseup="this.style.cursor='default'"> 0%
<body onMouseDown="this.style.cursor='default'" onSelectEnd="this.cursor='not-allowed'; return false;"> 0%
<body onSelectStart="this.style.cursor='not-allowed'; return false;" onMouseup="this.style.cursor='default'"> 0%
<body onMouseup="this.style.cursor='not-allowed'; return false;" onSelectStart="this.style.cursor='default'"> 0%
You want to display an alert that contains a ' (single-quote) character. Which of the following characters would you use to escape the ' character?
* 0%
0%
/ 0%
_ 0%
# 0%
% 0%
| 0%
~ 0%
You want to move all the paragraphs 30px towards the right relative to their normal position. The style definition should be:
p.relt{ position:relative; left:30px;} 0%
p.relt{ position:relative; left:-30px;} 0%
p{ position:relative; left:30px;} 0%
p{ position:relative; left:-30px;} 0%
You want to move some selected paragraphs 15px towards the left relative to their normal position. The style definition should be like:
p.relt{ position:relative; left:15px;} 0%
p.relt{ position:relative; left:-15px;} 0%
p{ position:relative; left:15px;} 0%
p{ position:relative; left:-15px;} 0%
You want to position a heading at 15 pixels from the left of the page and 20 pixels from the top of the page. The style definition should be:
h2.side{ position:relative; left:15px; top:20px;} 0%
h2.side{ position:absolute; left:15px; top:20px;} 0%
h2{ position:relative; left:15px; top:20px;} 0%
h2{ position:absolute; left:15px; top:20px;} 0%
You want to position all the h2 headings on the page at 15 pixels from the left of page and 20 pixels from the top of the page. The style definition should be:
h2.side{ position:relative; left:15px; top:20px;} 0%
h2.side{ position:absolute; left:15px; top:20px;} 0%
h2{ position:relative; left:15px; top:20px;} 0%
h2{ position:absolute; left:15px; top:20px;} 0%
You want to shake a link on the mouseover event. If the style position is set to relative and the anchor id is lnk1, which of the following code lines will be useful with a timer?
document.getElementById('lnk1').left="0" document.getElementById('lnk1').left="2" 0%
document.getElementById('lnk1').style.left="0" document.getElementById('lnk1').style.left="2" 0%
document.getElementById('lnk1').style.move="0" document.getElementById('lnk1').style.move="2" 0%
document.getElementById('lnk1').right="0" document.getElementById('lnk1').right="2" 0%
You want to validate the value in a field as soon as the user moves out of the field by pressing the tab key. Which of the following events would you use?
onblur 0%
onfocus 0%
lostfocus 0%
gotfocus 0%
None of the above 0%
Your website displays a few articles on java programming. If you want to leave '1 cm' space above and below the code blocks, you would use code { margin-top:1cm ; margin-bottom:1cm }.