HTML5 Тест Fiverr 100%

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?
     <tr>
<th>Customer Name</th>
<th rowspan=3>Contact</th>
</tr>
     <tr>
   <th>Customer Name</th>
   <th colspan=3>Contact</th>
 </tr>
     <tr>
<th>Customer Name</th>
<th cellpadding=3>Contact</th>
</tr>
     <tr>
<th>Customer Name</th>
<th cellspacing=3>Contact</th>
 </tr>

What is the default background color for the canvas element in HTML 5.0?
     Black
     White
     Transparent
     Gray

Which of the following is NOT a valid attribute for the <link> element in HTML 5.0?
     hreflang
     rel
     http-equiv
     media

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

How does a button created by the <button> tag differ from the one created by an <input> tag?
     An input tag button can be a reset button too.
     A button tag button can be a reset button too.
     An input tag button can include images as well.
     A button tag 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?
     onload
     onsubmit
     onunload
     onreset

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

Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column?
     col
     colgroup
     rowspan
     row

Which of the following video file formats are currently supported by the <video> element of HTML 5.0?
     CCTV
     MPEG 4
     Ogg
     3GPP

This question is based upon the figure shown below
<html>
<body>
<script type='text/javascript’>
function dosomething(e) {
if (!e) var e = window.event;
alert(e.type);
}

</script>
<form>
Numbers only: <input type=’text’ id=’number’/>
<input type=’button*

onclick="dosomething(document:gateElementByld('number *))"
            value=’checkfield’ />
</form>
</body>
</htmi>
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?
     number
     text
     button
     None of the above

Which of the following statements is correct if you allow the user to select only one radio button from a group of radio buttons?
     The name of the input tag must be the same for all the radio buttons.
     The value of the input tag must be the same for all the radio buttons.
     The display text of the input tag must be the same for all the radio buttons.
     All the radio buttons must be added to the same group using the <optgroup> tag.

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>
     .tnemucod ruoy ot nettirw eb dluohs taht txet emos si ereH
     Here is some text that should be written to your document.
     Here is some text that should be written to your document.
     None of the above.

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.
     <body backcolor=”Yellow”>
     <body background=”Yellow”>
     <body bgcolor=”Yellow”>
     <body color=”Yellow”>

How will you change the value of the cookies and items in the Storage objects of the localStorage attributes in HTML 5.0?
     By invoking the window.dialogArguments() API method.
     By invoking the window. navigator.yieldForStorageUpdates() API method.
     By invoking the window.navigator.appName 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>
     The target URL will open in the parent document.
     The target URL will open in a new window.
     The target URL will open in the same document in which it was clicked.
     The target URL will open in the full body of the window.

What will be the browsing context if the browsing context name is _top when the HTML 5.0 web page is loading?
     It will put the new document in the same window and frame as the current document.
     It will load the linked document in the topmost frame.
     It is used in the situation where a frameset file is nested inside another frameset file.
     Both a and c.

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

You have the following directory structure.
webroot->products->ordered->delivered
The products directory has a page called Products.html and the delivered directory has a page called Delivered.html. You want to provide a link to the Products page on Delivered.html. The ideal code should be:
     <a href=”././Products.html”> All Products </a>
     <a href=”../../Products.html”> All Products </a>
     <a href=”…/…/Products.html”> All Products </a>
     <a href=”../Products.html”> All Products </a>
     <a href=”Products.html”> All Products</a>

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>
     I use MAC Microsoft!
     I use MAC Microsoft!
     I use MAC Microsoft!
     I use MAC Microsoft!

Which of the following is the correct syntax to define a charset in the HTML 5 <meta> element?
     <meta http-equiv=”content-type” content=”text/html; charset=ISO-8859-1″>
     <meta charset=”ISO-8859-1″>
     Neither a nor b.

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

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

Which of the following is the correct method to load another web page or reload the same page in HTML 5.0?
     <head>
<meta http-equiv=refresh content=5>
</head>
     <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>
     <head>
<meta http-equiv=refresh content=”5;URL=http://yahoo.com >
</head>
     All of the above

Which of the following elements preserves spaces and line breaks, and displays the text in fixed-width font?
     <xmp>
     <pre>
     <p>
     <q>
     <br>

Which <body> tag event is fired when the user leaves the document?
     onunload
     onundo
     onredo
     onerror

Which of the following are INVALID keyword values for http-equiv attribute when used with the <meta> element in HTML 5.0?
     content-type
     expires
     set-cookie
     keywords
     refresh
     author

A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?
     <emp>
     <code>
     <dfn>
     <cite>

Which of the following is NOT a valid value for the type attribute of the <input> element in HTML 5.0?
     url
     week
     tel
     radio
     datetime-local
     All of the above are the valid values for <input> element

What is the role of the <dfn> element in HTML 5.0?
     It is used to define important text.
     It is used to define computer code text.
     It is used to define sample computer code.
     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?
     <link rel=”icon” href=”abc.jpg” sizes=”16×16″>
     <link rev=”stylesheet” href=”abc.css” type=”text/css” target=”_parent”>
     <link rel=”alternate” type=”application/pdf” hreflang=”fr”  href=”manual-fr”>

Which of the following are valid HTML 5.0 elements?
     <canvas>
     <summary>
     <aside>
     <video>

Which of the following is NOT a valid syntax for the element in HTML 5.0?
     <h1 class="cheader"> This is header 1 </h1 >
     <h1 align=”center”> This is header 1</h1>
     <h1 onClick=”dothis(‘sc1′)” >This is header </h1>
     <h1 style=”cursor:auto;”>This is header </h1>

Which of the following statements are correct with regard to <hr> and <br> elements of HTML 5.0?
     <hr> element acts in the same way as the Tab key on your keyboard and <br> element acts in the same way as the SHIFT key on your keyboard.
     <hr> element is used to insert the horizontal line within your document and <br> element is used to insert a single line break.
     <hr> element is used to put a line across the page and <br> element acts in the same way as the ENTER key on your keyboard.

What will be the return value when using the window.navigator.appName API method in an HTML 5.0 web application?
     It will return the version of the browser.
     It will return the complete User-Agent header.
     It will return the name of the platform.
     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?
     VB script
     JavaScript
     PostScript
     None of the above

What is the function of the history traversal task source in HTML 5.0?
     It is used for features that react to user interaction, for example, keyboard or mouse input.
     It is used for features that react to DOM manipulations, for example, the things that happen asynchronously when an element is inserted in the document.
     It is used to queue calls to history.back() and similar APIs.
     All of the above.

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

In HTML 5.0, what is the function of the sandbox attribute when used with <iframe> as shown below?
<iframe src=”aaa ” sandbox=?></iframe>
     It is used to define the restrictions to the frame content.
     It is used to define the URL of the document that should appear in the iframe.
     It is used to specify that an iframe should appear as if it is part of the document the iframe is in.

Which of the following statements is correct for a blockquote?
     It makes the text a bit bigger for emphasizing.
     It defines a section that is quoted from the another source
     It makes the text slightly bolder.

Which event is fired when the history of the browser window changes?
     onpopstate
     onstorage
     onresize
     onhashchange

This question is based upon the figure shown below
Suppose you placed four radio buttons on a web form. Which of the following statements is correct for the code shown above?
Male: <input type-,radio,,checked="checked" name-'chk”value="male">
Female <input type-’radio” name="chk" value-’fern ale“>
Married <input type-’radio" checked-’checked” name-’chk" value-’married">
Single: <input type= "radio” name-’chk" value="single">
     The user can choose only the male and the married options.
     The user can choose only the female and single options.
     The user can choose only one option out of the four.
     The user can choose all the four options at the same time.
     The user can choose one option from Male/Female and one from Married/Single.

When does the ondragleave mouse event get fired in HTML 5.0?
     It gets fired when an element has been dragged to a valid drop target.
     It gets fired when an element leaves a valid drop target.
     It gets fired at the end of a drag operation.
     It gets fired while an element is being dragged.

Which of the following are valid mouse events in HTML 5.0?
     ondblclick
     ondragstart
     ondragenter
     onscroll
     ondrop

Which of the following <iframe> attributes are NOT supported in HTML 5.0?
     height
     marginheight
     sandbox
     scrolling

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

In which of the following conditions is a browsing context A allowed to navigate a second browsing context B?
     When the browsing context A is a nested browsing context and its top-level browsing context is B.
     When the browsing context B is an auxiliary browsing context and A is allowed to navigate B’s opener browsing context.
     The origin of the active document of A is the same as the origin of the active document of B.
     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?
     url
     mimeType
     scheme
     title

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>
     The target URL will open in the parent document.
     The target URL will open in a new window.
     The target URL will open in the same document in which it was clicked.
     The target URL will open in the full body of the window.

You specified a base tag and anchors as follows:
1. <base target=”_blank”>
2. <a href=”http://www.yahoo.com”>Yahoo</a>
3. <a href=”http://www.google.com” target=”_top”>Google</a>
Which of the following is true of the above code?
     Only the Yahoo link will open in a new window.
     Only the Google link will open in a new window.
     Both links will open in a new window.
     Both links will open in the same window.

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

In HTML 5.0, how will the script be executed if you use the script element shown below?
<script src=”script.js” type=”text/javascript” defer=”defer”></script>
     The script is fetched and executed immediately, before the user agent continues parsing the page.
     The script will be executed when the page has finished parsing.
     The script will be executed asynchronously, as soon as it is available.

Which of the following is correct with regard to the oncanplaythrough event fired by media resources in the HTML 5.0 document?
     The script will run when the media has reached the end.
     The script will run when the media is played to the end, without stopping for buffering.
     The script will run when media data is loaded.
     The script will run when the length of the media is changed.

What is the output when you use the HTML 5.0 code snippet shown below?
<body onload=”alert(this)”>
     It will alert saying “[object HTMLBodyElement]” when the document is loaded.
     It will alert saying “[object Window]” when the document is loaded.
     It will alert saying “[this]” when the document is loaded.
     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 represents INVALID syntax for defining an attribute value in an HTML 5.0 document?
     <input name =’be evil’ />nput name= be evil/
     <input name=be evil />
     <input name = “be-evil” />
     All of the above.

What is the purpose of the <q> element in HTML 5.0?
     It is used to define the start of a term in a definition list.
     It is used to define attribute values for one or more columns in a table.
     It is used to define the start of a short quotation
     It is used to define what to show browsers that do not support the ruby element.

Which of the following events is NOT supported in HTML 5.0?
     oninput
     oninvalid
     ondrop
     onreset

How will you cancel the timeouts that are set with the setInterval() API method identified by the handlers in HTML 5.0?
     window.clearInterval (handle)
     window.clearTimeout (handle)
     window.setInterval (code, timeout)
     window.setTimeout (code, timeout)

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

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?
     accept
     autofocus
     autocomplete
     formtarget

Which HTML 5.0 element will you use to group the related options in a drop-down list?
     optgroup
     option
     menu
     var
     nav

This question is based upon the figure shown below
How will you bind the datalist option (shown below) with an <input> element, whose type attribute is set to url, to get the result shown in the image?
     User should define an accept attribute to the input element whose type is url.
     User should define multiple attribute to the input element whose type is url.
     User should define a list attribute to the input element whose type is url.
     User should define a placeholder attribute to the input element whose type is url.

What does the icon attribute of the HTML 5.0 command tag define?
<command icon=”?”>Click Me!</command>
      It is used to define the URL of an image to display as the command.
     It is used to define the name of the radiogroup this command belongs to.
     It is used to define if the command is checked or not.
     It is used to define if the command is available or not.

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?
     td
     p
     ls
     pre

Which event is fired when an element loses its focus in HTML 5.0 document?
     onfocus
     onload
     onblur
     onselect

What is the purpose of the <keygen> element in HTML 5.0?
     It is used to define a keyboard text in an HTML 5.0 web page.
     It is used to generate a public-private key pair in an HTML 5.0 web page.
     It is used to define a definition term in an HTML 5.0 web page.
     It is used to define a variable in an HTML 5.0 web page.

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

While rendering your HTML 5.0 web page, which of the following <link> element files will get skipped by a compliant user agent if you include the link elements shown below in your document?
<link rel=”stylesheet” href=”A” type=”text/plain”>
<link rel=”stylesheet” href=”B” type=”text/css”>
     A link element whose href is “B”
     A link element whose href is “A”
     None of the above

Which of the following is NOT an attribute of the <meta> element in HTML 5.0?
     charset
     content
     http-equiv
     scheme

Which of the following statements is correct if you invoke the window.prompt (message, default) web application API method in HTML 5.0?
     It will only show the modal text field prompt with the given message to the user.
     It will show the modal text field prompt with the given message to the user, and ask the user to respond with a positive or negative response.
     It will show the modal text field prompt with the given message to the user, and ask the user to either respond with a string value or abort.
     Both b and c.

Which of the following is NOT a valid value for the <iframe> sandbox attribute in HTML 5.0?
     url
     allow-scripts
     allow-same-origin
     allow-forms

What is the function of onobsolete, an application cache API method in HTML 5.0?
     It reflows the HTML document using updated cached content.
     It triggers an event when the cache content has been marked as obsolete.
     It triggers an event when the cache content has been updated.
     It updates the cache for the current document in the background.

 Suppose there are three lines of text to be displayed. These lines are as follows:
"First Line",
"Second Line"
"New line"
If you want "New Line"to be displayed in between the other two lines, then which of the following is the correct syntax to do so?
     <html>
  <body>
    <script>
      var newText=document.createElement("anew");
      var node=document.createTextNode("New Line.");
      newText.appendChild(node);

      var element=document.getElementById("Firstdiv");
      var newchild=document.getElementById("a2");
      element.insertBefore(newText,newchild);
    </script>
    <div id="Firstdiv">
      <p id="a1">First Line.</p>
      <p id="a2">Second Line.</p>
    </div>
  </body>
</html>

     <html>
  <body>
    <div id="Firstdiv">
      <p id="a1">First Line.</p>
      <p id="a2">Second Line.</p>
    </div>
    <script>
      var newText=document.createElement("anew");
      var node=document.createTextNode("New Line.");
      newText.appendChild(node);

      var element=document.getElementById("Firstdiv");
      var newchild=document.getElementById("a2");
      element.insertBefore(newText,newchild);
    </script>
  </body>
</html>

     <html>
  <body>
    <div id="Firstdiv">
      <p id="a1">First Line.</p>
      <p id="a2">Second Line.</p>
    </div>
    <script>
      var newText=document.createElement("anew");
      var node=document.createTextNode("New Line.");
      newText.appendChild(node);

      var element=document.getElementById("Firstdiv");
      element.appendChild(newText);
    </script>
  </body>
</html>

 A developer wros image tag:
<img src ="states.gif" width ="330" height ="406" alt="States"
usemap ="#statemap" />
What code should follow this?
     <map id ="statemap" name="statemap">
       <area shape ="rect" coords ="0,0,82,126" href="/state1.htm"
       alt="State1" />
    </map>
     <map id ="statemap" name="statemap"></map>
    <area shape ="rect" coords ="0,0,82,126" href="/state1.htm" alt="State1" />
     <map id ="statemap" name="statemap">
       <imgarea shape ="rect" coords ="0,0,82,126" href="/state1.htm" alt="State1" /></map>
     <map id ="statemap" name="statemap"></map>
    <imgarea shape ="rect" coords ="0,0,82,126" href="/state1.htm" alt="State1" />

 What will be the output of the following HTML DOM code?
<!DOCTYPE html>
<html><body>
    <p id="begins">First Attempt! </p>
    <script>
      var txt=document.getElementById("begins").innerHTML;
    </script>
</body></html>

First Attempt!

     First Attempt!
       First Attempt!

     First Attempt!
       null

     First Attempt!
       begins

     blank, nothing will appear on screen

 Which of the following is the correct method to change the background color to indigo with help of a button?
     <!DOCTYPE html>
<html>
  <body>
    <script>
      function ChangeBackground()
      {
      document.backgroundColor="Indigo";
      }
    </script>
    <input type="button" value="New Color" onclick="ChangeBackground()"/>
  </body>
</html>

     <!DOCTYPE html>
<html>
  <body>
    <input type="button" value="New Color" onclick="ChangeBackground()"/>
    <script>
      function ChangeBackground()
      {
      document.body.style.backgroundColor="Indigo";
      }
    </script>
  </body>
</html>

     <!DOCTYPE html>
<html>
  <body>
    <script>
      function ChangeBackground()
      {
      document.new.backgroundColor="Indigo";
      }
    </script>
    <input type="button" value="New Color" onclick="ChangeBackground()"/>
  </body>
</html>
     None of the above

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

 You want to create a link for your website allowing users to email the webmaster. How will you implement this if the webmaster's email address is webmasterOxcompany.com?
     <a href="mailto:webmasterOxcompany.com">webmaster</a>
     <a href="/webmasterOxcompany.com">webmaster</a>
     <a http="mail:webmasterOxcompany.com">webmaster</a>
     <mail http="send:webmasterOxcompany.com">webmaster</mail>
     <a href="mailto://webmasterOxcompany.com">webmaster</a>

 For adding a new child node before a specified child node, which of the following methods is used?
     insertBefore()
     replaceChild()
     appendChild()

Suppose you want to display certain text , for example, "First Program !"in red color and times new roman font family on the screen. Which of the following is the correct syntax to do so?

<!DOCTYPE html>
<html><body>
<p id="p1">First program!</p>
<script>
document.getElementByld("p1").style.color="red";
document.getElementByld("p1").style.fontFamily=Times newroman";
</script><body><html>

<!DOCTYPE html>
<html><body>
<p id="p1 ">First program!</p>
<script>
document.getElementByld("p1").style.color="red" && style.fontFamily="Times new roman"; </script><body><html>

<!DOCTYPE html>
<html>
<body>
<p id="p1 ">First program!</p>
<script>
document.getElementByld("p1")color="red" && fontFamily="Times new roman"; </script><body><html>

None of the above

This question is based on the graphic shown below.
The name property of "Element"node shown in figure will return ____________________.
tag name
     name of node
     name of element
     value of element

Which of the following is/are the correct method/s to access HTML element?
     getElementById()
     getElementsByTagName()
     getElementsByClassName()
     All of the above

In HTML 5.0, which of the following media events is triggered when fetching of media data is interrupted before it having completely loaded (due to any reason)?
     onstalled
     onwaiting
     onsuspend
     oninvalid

Which of the following is an obsolete attribute of the <ol> element in HTML 5.0?
     type
     reversed
     start
     compact

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.
     i & ii
     i & iii
     ii & iii
     All of the above
     None of the above

My favorite color is blue red!
Which piece of code will you use in your HTML 5.0 document to get the output as shown in the image?
     <p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
     <p>My favorite color is <s>blue</s> red</p>
     <p>My favorite color is <strike>blue</strike> red!</p>
     <p>My favorite color is <del>blue</del> red!</pxbr>

Consider the above code. What will be the impact upon the contents of the element if both the style sheets define the same class?
<html>

<head>
<title>untitled Page</title>
<link rel=stylesheet href=style.css />
<link rel=stylesheet href=stylel1.css />
</head>
<body>
<span class="heading">Text goes here.......</span>
</body>
</html>

style.css
.heading
{
font-family:verdana;
font-style:normal;
font-weight:bold;
font-size:11pt;
color:Red;
}
stvle1.css
.heading
{   font-family:verdana;
font-style:normal;
font-weight:bold;
font-size:llpt;
color:Blue;
}
     The contents of the element will be of red color and will inherit all the effects of style.css.
     The contents of the element will be of blue color and will inherit all the effects of style 1 .css.
     The contents of the element will be of white color and will inherit all the effects of style.css and style 1 .css.
     None of the style effects will be applied to the contents of the element.

Consider the following items of a <select> list:
<option value="89">Item 1</option>
<option value="90">Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
     89
     90
     Item 1
     Item 2

What will be the output of following HTML code ?
<!DOCTYPE html>
<html>
<body>
<p id="p1">First Program!</p>
<script>
document.getElementById("p1").innerHTML="New text!";
</script>
</body>
</html>

     First Program!

     First Program!
null

     First Program!
New text!

     New text!

     New text!
null

What will be the output of the following HTML code?
<!DOCTYPE html>
<html>
<body>
<p id="Begins">First Attempt! </p>
<script>
x=document.getElementById("Begins");
document.write(x.nodeValue);
</script>
</body>
</html>

     First Attempt!

     First Attempt!
First Attempt!

     First Attempt!
null

     No output

HTML5 Fiverr Тест 2020