ODesk HTML5 Test Answer 9/10/2014 - oDesk Test Answers

This is HTML5 Test Fully Update. You can pass this test. If you any problem please contact with me

My Skype id is akasernil17



Which of the following statements is correct for a blockquote?

a.       It makes the text a bit bigger for emphasizing.
b.      It defines a section that is quoted from the another source
c.       It makes the text slightly bolder.
d.      It defines the start of a long quote.

Which of the following HTML 5.0 elements is used to embed Java applets into your HTML 5.0 web page?
a.       <applet>
b.      <object>
c.       <source>
d.      <progress>


This question is based upon the figure shown below
Suppose you add the input code given above to your HTML web page. What result will be returned by the JavaScript function when you click the button marked as A in the image?

a.       Number
b.      Text
c.       Button
d.      None of the above

What is the output when you use the HTML 5.0 code snippet shown below?
 <body onload="alert(this)">

a.       It will alert saying "[object HTMLBodyElement]" when the document is loaded.
b.      It will alert saying "[object Window]" when the document is loaded.
c.       It will alert saying "[this]" when the document is loaded.
d.      The alert message is not properly defined in the body element and an error will be generated when the document is loaded.

Which of the following is the correct method to load another web page or reload the same page in HTML 5.0?

a.       <head> <meta http-equiv=refresh content=5>  </head>
b.      <html> <head> <title>Auto Reload</title>  <script language="JavaScript"> <!--var time = null
 function move() {window.location = 'http://site.com' }
 //-->
 </script>
 </head>
 <body onload="timer=setTimeout('move()',5000)">
 <p>see this page refresh itself in 5 secs.<p>
 </body>
 </html>
c.       <head> <meta http-equiv=refresh content="5;URL=http://yahoo.com > </head>
d.      All of the above

How will you return a reference to the parent of the current window or subframe in an HTML 5.0 web application?

a.       window.top
b.      window.parent
c.       window.frameElement
d.      None of the above

Which of the following languages will you use to paint the graphics designed using the HTML 5.0 <canvas> tag?

a.       VB script
b.      JavaScript
c.       PostScript
d.      None of the above



Which of the following are valid values for the contenteditable attribute of the <figure> element in HTML 5.0?

a.       True
b.      False
c.       0
d.      1

Which <iframe> attribute is used to define the restrictions to the frame content in HTML 5.0?

a.       Seamless
b.      Sandbox
c.       srcdoc

How will you cancel the timeouts that are set with the setInterval() API method identified by the handlers in HTML 5.0?

a.       window.clearInterval (handle)
b.      window.clearTimeout (handle)
c.       window.setInterval (code, timeout)
d.      window.setTimeout (code, timeout)

Which of the following is the correct syntax to define a charset in the HTML 5 <meta> element?

a.       <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
b.      <meta charset="ISO-8859-1">
c.       Neither a nor b.

Which of the following represents INVALID syntax for defining an attribute value in an HTML 5.0 document?

a.       <input name ='be evil' />
b.      <input name=be evil />
c.       <input name = "be-evil" />
d.      All of the above.

Which event is fired when an element loses its focus in HTML 5.0 document?

a.       Onfocus
b.      Onload
c.       Onblur
d.      Onselect

When does the ondragleave mouse event get fired in HTML 5.0?

a.       It gets fired when an element has been dragged to a valid drop target.
b.      It gets fired when an element leaves a valid drop target.
c.       It gets fired at the end of a drag operation.
d.      It gets fired while an element is being dragged.

Which event is fired when the history of the browser window changes?

a.       Onpopstate
b.      Onstorage
c.       Onresize
d.      onhashchange

Which of the following is NOT a valid attribute for the <video> element in HTML 5.0?

a.       controls
b.      autoplay
c.       disabled
d.      preload

Which of the following is the correct syntax to change the text 'WELCOME!' to 'Hello!'?
a.       <h1 onclick=='WELCOME!'>Hello! </h1>
b.      <h1 onclick. innerHTML=='Hello!'>WELCOME! </h1>
c.       <h1 onclick="this.innerHTML='Hello!'">WELCOME! </h1>
d.      <h1 onclick="this.innerHTML='WELCOME!', 'Hello!' </h1>

What is the purpose of the <keygen> element in HTML 5.0?

a.       It is used to define a keyboard text in an HTML 5.0 web page.
b.      It is used to generate a public-private key pair in an HTML 5.0 web page.
c.       It is used to define a definition term in an HTML 5.0 web page.
d.      It is used to define a variable in an HTML 5.0 web page.

Which of the following is NOT a valid value for the type attribute of the <input> element in HTML 5.0?

a.       url
b.      week
c.       tel
d.      radio
e.       datetime-local
f.        All of the above are the valid values for <input> element

Which <body> tag event is fired when the user leaves the document?

a.       Onunload
b.      Onundo
c.       Onredo
d.      onerror

When is the window onstorage event triggered in the HTML document?
a.       It is triggered when the window is resized.
b.      It is triggered when a Web Storage area is updated.
c.       It is triggered when a document performs an undo function.
d.      It is triggered when the window becomes visible.

What is the role of the <dfn> element in HTML 5.0?

a.       It is used to define important text.
b.      It is used to define computer code text.
c.       It is used to define sample computer code.
d.      It is used to define a definition term

In HTML 5.0, what is the function of the sandbox attribute when used with <iframe> as shown below?

 <iframe src="aaa " sandbox=?></iframe>
a.       It is used to define the restrictions to the frame content.
b.      It is used to define the URL of the document that should appear in the iframe.
c.       It is used to specify that an iframe should appear as if it is part of the document the iframe is in.

What does the icon attribute of the HTML 5.0 command tag define?
<command icon="?">Click Me!</command>

a.       It is used to define the url of an image to display as the command.
b.      It is used to define the name of the radiogroup this command belongs to.
c.       It is used to define if the command is checked or not.
d.      It is used to define if the command is available or not.

How will the target URL open when you define the <a> element in your HTML 5.0 document as shown below?

<a href="http://www.yahoo.com" target="_self">Click here</a>
a.       The target URL will open in the parent document.
b.      The target URL will open in a new window.
c.       The target URL will open in the same document in which it was clicked.
d.      The target URL will open in the full body of the window.

What will be the result if you use the following code to your HTML 5.0 document?
<p>I use <del>MAC</del> <ins>Microsoft</ins>!</p>

a.       I use MAC Microsoft!
b.      I use MAC Microsoft!
c.       I use MAC Microsoft!
d.      I use MAC Microsoft!
Which of the following tags would assist in creating named groups within a select list?
a.       Opt
b.      Group
c.       Optgroup
d.      selectgroup

In HTML 5.0, which of the following attributes of the <object> element refers to the location of the object's data?

a.       Type
b.      Codebase
c.       Data
d.      usemap
This question is based upon the figure shown below
You want to display a table listing out customer names and their contact information. The heading of the table is shown in the given figure. What is the code for creating the first line of the table heading?
a.       <tr>
   <th>Customer Name</th>
   <th rowspan=3>Contact</th>
 </tr>
b.      <tr>
   <th>Customer Name</th>
 <th colspan=3>Contact</th>
 </tr>
c.       <tr>
   <th>Customer Name</th>
 <th cellpadding=3>Contact</th>
 </tr>
d.      <tr>
   <th>Customer Name</th>
   <th cellspacing=3>Contact</th>
            </tr>
Which HTML 5.0 element will you use to group the related options in a drop-down list?
a.       Optgroup
b.      Option
c.       Menu
d.      Var
e.      nav

Which of the following is true about HTML DOM?
i) It is a standard object model for HTML.
ii) It is a programming language.
iii) It is a standard programming interface for HTML.

a.       i & ii
b.      i & iii
c.       ii & iii
d.      All of the above
e.      None of the above

A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?

a.       <emp>
b.      <code>
c.       <dfn>
d.      <cite>
Which of the following conditions is a browsing context A allowed to navigate a second browsing context B?

a.       When the browsing context A is a nested browsing context and its top-level browsing context is B.
b.      When the browsing context B is an auxiliary browsing context and A is allowed to navigate B's opener browsing context.
c.       The origin of the active document of A is the same as the origin of the active document of B.
d.      All of the above.
Which media event will be fired when a media resource element suddenly becomes empty?
a.       Onerror
b.      Onended
c.       Onloadeddata
d.      onemptied

This question is based upon the figure shown below
Which piece of code will you use in your HTML 5.0 document to get the output as shown in the image?

a.       <p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
b.      <p>My favorite color is <s>blue</s> red</p>
c.       <p>My favorite color is <strike>blue</strike> red!</p>
d.      <p>My favorite color is <del>blue</del> red!</p>

Which of the following are valid HTML 5.0 elements?

a.       <canvas>
b.      <summary>
c.       <aside>
d.      <video>

Which of the following is an INVALID value for the type attribute of command tag?

a.       Checkbox
b.      Radio
c.       Command
d.      Text

The following link is placed on an HTML webpage.
 <a href="http://msdn.com/" target="_blank"> MSDN </a>
What do you infer from it?

a.       It will open the site msdn.com in the same window.
b.      It will open the site msdn.com in a new window.
c.       It will open the site msdn.com in a frame below.
d.      It will not be clickable as it is not formed correctl

The following link is placed on an HTML webpage.
 <a href="http://msdn.com/" target="_blank"> MSDN </a>
What do you infer from it?

a.       It will open the site msdn.com in the same window.
b.      It will open the site msdn.com in a new window.
c.       It will open the site msdn.com in a frame below.
d.      It will not be clickable as it is not formed correctl

Which media event is triggered when there is an error in fetching media data in HTML 5.0?

Ans: a. onstalled

Which of the following video file formats are currently supported by the <video> element of HTML 5.0?

Ans: b. MPEG 4

Which of the following is NOT a valid value for the

Ans: a. It is used to define the restrictions to the frame content.

Which of the following is NOT a supported attribute of the <ol> element in HTML 5.0?

Ans: c. compact

When is the window onstorage event triggered in the HTML document?

Ans: d. It is triggered when a document performs an undo function.

Which of the following is NOT a valid attribute for the <video> element in HTML 5.0?

Ans: b. disabled

Suppose you add the input code given above to your HTML web page. What result will be returned by the JavaScript function when you click the button marked as A in the image?

Ans: b. text

How does a button created by the <button> tag differ from the one created by an <input>tag ?

Ans: c. An input tag button can include images as well.

Which of the following is NOT a valid attribute for the element in HTML 5.0?

Ans: c. http-equiv

Which of the following are valid values for the contenteditable attribute of theelement in HTML 5.0?

Ans: a. true

You want to display a table listing out customer names and their contact information. The heading of the table is shown in the given figure. What is the code for creating the first line of the table heading?

Ans: b .<tr> <th>Customer Name</th> <th colspan=3>Contact</th> </tr>

Which of the following <section> elements have the correct attribute assignment as per HTML 5.0?

Ans: c. <section id=”EXAMPLE”>…</section>

Which of the following statements is correct if you invoke the window.prompt (message, default) web application API method in HTML 5.0?

Ans d. Both b and c.

Which of the following is NOT an attribute of the <meta> element in HTML 5.0?

Ans: d. scheme

Which media event will be fired when a media resource element suddenly becomes empty?

Ans: d. onemptied

What is the purpose of the <keygen> element in HTML 5.0?
b. It is used to generate a public-private key pair in an HTML 5.0 web page.
Which event is fired when an element loses its focus in HTML 5.0 document?

Ans: c. onblur

A piece of text contains many blank spaces within it. Which of the following tags would be suitable to display the text as it was originally formatted?

Ans: d. pre

Which HTML 5.0 element will you use to group the related options in a drop-down list?

Ans: a. optgroup

You are writing the code for an HTML form and you want the browser to retain the form’s input values. That is, if a user submits the form and presses the browser’s back button, the fully populated form is displayed instead of a blank form. Which of the following HTML 5.0 attributes will you use?

Ans: d. formtarget

Which of the following tags would assist in creating named groups within a select list?

Ans: c. optgroup

How will you cancel the timeouts that are set with the setInterval() API method identified by the handlers in HTML 5.0?

Ans : a. window.clearInterval (handle)

What is the default background color for the canvas element in HTML 5.0?

Ans : c. Transparent

Which of the following are valid values for the contenteditable attribute of the <figure> element in HTML 5.0?

Ans : a. true

Which media event is triggered when there is an error in fetching media data in HTML 5.0?

Ans : c. onsuspend

Which of the following is NOT a valid attribute for the <link> element in HTML 5.0?

Ans : c. http-equiv

How does a button created by the <button> tag differ from the one created by an <input> tag?

Ans : c. An input tag button can include images as well.

Which form event is fired on the click of a button using a button tag with its type attribute value equal to submit?

Ans : b. onsubmit

How will you return a reference to the parent of the current window or subframe in an HTML 5.0 
web application?

Ans : b. window.parent

Which of the following statements is correct if you allow the user to select only one radio button from a group of radio buttons?

Ans : a. The name of the input tag must be the same for all the radio buttons.

What will be the result if you use the following code to your HTML 5.0 document?

<bdo dir=”rtl”> Here is some text that should be written to your document. </bdo>

Ans : a. .tnemucod ruoy ot nettirw eb dluohs taht txet emos si ereH

Which of the following would give a yellow background to the web page?
Note: The code used in the “correct” answer below was deprecated in HTML 4.01! Use styles instead for new code.

Ans : c. <body bgcolor=”Yellow”>

How will you change the value of the cookies and items in the Storage objects of the localStorage attributes in HTML 5.0?

Ans : b. By invoking the window. navigator.yieldForStorageUpdates() API method.

How will the target URL open when you define the <a> element in your HTML 5.0 document as shown below?
<a href=”http://www.yahoo.com” target=”_self”>Click here</a>

Ans : c. The target URL will open in the same document in which it was clicked.

What will be the browsing context if the browsing context name is _top when the HTML 5.0 web page is loading?

Ans : b. It will load the linked document in the topmost frame.

Which of the following is an INVALID value for the type attribute of command tag?

Ans : d. text

The following link is placed on an HTML webpage.
<a href=”http://msdn.com/” target=”_blank”> MSDN </a>
What do you infer from it?

Ans : b. It will open the site msdn.com in a new window.

You have the following directory structure. webroot->products->ordered->delivered

Ans : b. <a href=”../../Products.html”> All Products </a>

What will be the result if you use the following code to your HTML 5.0 document?

Ans : a. I use MAC Microsoft!

Which of the following is the correct syntax to define a charset in the HTML 5 <meta> element?

Ans : b. <meta charset=”ISO-8859-1″>

Which of the following is NOT a supported attribute of the <ol> element in HTML 5.0?

Ans : d. compact

Which of the following is a valid attribute for the <colgroup> element in an HTML 5.0 document?

Ans : b. span

Which of the following is the correct method to load another web page or reload the same page in HTML 5.0?

Ans : d. All of the above

Which of the following elements preserves spaces and line breaks, and displays the text in fixed-width font?

Ans : b. <pre>

Which <body> tag event is fired when the user leaves the document?

Ans : a. onunload

Which of the following is an INVALID keyword value for http-equiv attribute when used with the <meta> element in HTML 5.0?

Ans : b. expires

A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?

Ans : b. <code>

Which of the following is NOT a valid value for the type attribute of the <input> element in HTML 5.0?

Ans : f. All of the above are the valid values for <input> element

What is the role of the <dfn> element in HTML 5.0?

Ans : d. It is used to define a definition term

Which of the following is NOT a valid syntax for the <link> element in HTML 5.0?

Ans : c. <link rel=”alternate” type=”application/pdf” hreflang=”fr” href=”manual-fr”>

Which of the following are valid HTML 5.0 elements?

Ans : a. <canvas>

Which of the following is NOT a valid syntax for the <h1> element in HTML 5.0?

Ans : b. <h1 align=”center”> This is header 1</h1>

Which of the following statements are correct with regard to <hr> and <br> elements of HTML 5.0?

Ans : b. <hr> element is used to insert the horizontal line within your document and <br> element is used to insert a single line break.

What will be the return value when using the window.navigator.appName API method in an HTML 5.0 web application?

Ans : d. It will return the name of the browser.

Which of the following languages will you use to paint the graphics designed using the HTML 5.0 <canvas> tag?

Ans : b. JavaScript

What is the function of the history traversal task source in HTML 5.0?

Ans : c. It is used to queue calls to history.back() and similar APIs.

Which <iframe> attribute is used to define the restrictions to the frame content in HTML 5.0?

Ans : b. sandbox

In HTML 5.0, what is the function of the sandbox attribute when used with <iframe> as shown below?

Ans : a. It is used to define the restrictions to the frame content.

Which of the following statements is/are correct for a blockquote?

Ans : b. It defines the start of a long quote.

Which event is fired when the history of the browser window changes?

Ans : a. onpopstate

Which of the following <link> attributes are NOT supported in HTML 5.0?

Ans : d. charset

Suppose you placed four radio buttons on a web form. Which of the following statements is correct for the code shown above?

Ans : c. The user can choose only one option out of the four.

When does the ondragleave mouse event get fired in HTML 5.0?

Ans : b. It gets fired when an element leaves a valid drop target.

Which of the following are valid mouse events in HTML 5.0?

Ans : a. ondblclick

Which of the following <iframe> attributes are NOT supported in HTML 5.0?

Ans : b. marginheight

In HTML 5.0, which of the following attributes of the <object> element refers to the location of the object’s data?

Ans : c. data

In which of the following conditions is a browsing context A allowed to navigate a second browsing context B?

Ans : d. All of the above

Which of the following is an INVALID parameter for the window.navigator.registerContentHandler API method in an HTML 5.0 web application?

Ans : c. scheme

How will the target URL open when you define the <a> element in your HTML 5.0 document as shown below?

Ans : c. The target URL will open in the same document in which it was clicked.

You specified a base tag and anchors as follows:

Ans : 2. <a href=”http://www.yahoo.com”>Yahoo</a

Which of the following is true of the above code?

Ans : a. Only the Yahoo link will open in a new window.

When is the window onstorage event triggered in the HTML document?

Ans : b. It is triggered when a document loads.

In HTML 5.0, how will the script be executed if you use the script element shown below?

Ans : b. The script will be executed when the page has finished parsing.

Which of the following is correct with regard to the oncanplaythrough event fired by media resources in the HTML 5.0 document?

Ans : b. The script will run when the media is played to the end, without stopping for buffering.

What is the output when you use the HTML 5.0 code snippet shown below?

Ans : b. It will alert saying “[object Window]” when the document is loaded.

Which of the following represents INVALID syntax for defining an attribute value in an HTML 5.0 document?

Ans : d. All of the above.

What is the purpose of the <q> element in HTML 5.0?

Ans : c. It is used to define the start of a short quotation.

Which of the following events is NOT supported in HTML 5.0?

Ans : d. onreset

<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>><<<<<<<<<>>>>>>>>>>>>>><<<<<<<<<>>>>>

I do not know under is amswer so i am sorry

Which of the following are the valid values of the <a> element's target attribute in HTML5?
Once an application is offline, it remains cached until the following happens (select all that apply):
Consider the following JavaScript code:
Which method of HTMLCanvasElement is used to represent image of Canvas Element?
Which of the following <section> elements have the correct attribute assignment as per HTML5?
What is the difference between Server-Sent Events (SSEs) and WebSockets in HTML5?
When does the ondragleave mouse event get fired in HTML5?
What does P2P streaming mean when web applications establish a P2P HTTP connection using HTML?
Which of the following video file formats are currently supported by the <video> element of HTML5?
Which of the following is not a valid attribute for the <video> element in HTML5?
How can audio files be played in HTML5?
What is the purpose of the <q> element in HTML5?
Which of the following HTML5 features is capable of taking a screenshot of a web page?
JavaScript objects can be stored directly into localStorage.
Which following are valid default values for the <input type="date"> HTML5 element?

Which of the following are valid HTML5 elements?

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>><<<<<<<>>>>>>>
Previous
Next Post »