HTML5 Тест Upwork часть 1

What does the icon attribute of the HTML5 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.
There are different types of form controls that you can use to collect data using HTML form?
Note: There may be more than one right answer.
       File Select boxes
       Hidden Controls
       Clickable Buttons
       Video Controls
       Checkboxed Controls
Which of the following are important attributes which can be used with  tag? (choose all that apply)
Note: There may be more than one right answer.
       hide
       autoplay
       align
       name
       loop
Getting images to draw the canvas API is able to use any of the following data types as an image source?
Note: There may be more than one right answer.
       HTMLCanvasElement
       HTMLVideoElement
       HTMLImageElement
       None of the above
The <basefont> element is supposed to set a default font for ____ , ____ , and typeface?
Note: There may be more than one right answer.
       size
       color
       family
       id
The hit region API allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools, The API also has the following methods?
Note: There may be more than one right answer.
       CanvasRenderingContext2D.clearHitRegions()
       CanvasRenderingContext2D.removeHitRegion()
       CanvasRenderingContext2D.addHitRegion()
       CanvasRenderingContext2D.getHitRegion()
The following methods can be used to manipulate paths of objects?
Note: There may be more than one right answer.
       CanvasRenderingContext2D.bezierCurveTo()
       CanvasRenderingContext2D.quadraticCurveTo()
       CanvasRenderingContext2D.line()
       CanvasRenderingContext2D.rectangle()
       CanvasRenderingContext2D.beginPath()
Line styles, There are several properties which allow us to style lines include the following?
Note: There may be more than one right answer.
       lineDashOffset: Specifies where to start a dash array on a line
       miterLimit: Sets the appearance of the ends of lines
       lineWidth: Sets the width of lines drawn in the future
       lineCap: Sets the current line dash pattern
       lineJoin: Sets the appearance of the "corners" where lines meet
The ImageData object, represents the underlying pixel data of an area of a canvas object include the following read-only attributes?
Note: There may be more than one right answer.
       width
       height
       id
       length
       data
Drawing text, The following methods are provided for drawing text?
Note: There may be more than one right answer.
       CanvasRenderingContext2D.measureText()
       CanvasRenderingContext2D.drawText()
       CanvasRenderingContext2D.fillText()
       CanvasRenderingContext2D.strokeText()
Play Audio Loop using the following code example?
       audio = new Audio(‘asound.ogg');
audio.addEventListener('ended', function() {
    this.currentTime = 0;
    this.play();
}, false);
audio.play();
       audio = new Audio('someSound.ogg');
if (typeof audio.loop == 'boolean')
{
    audio.loop = true;
}
else
{
    audio.addEventListener(‘loop’, function() {
        this.currentTime = 1;
        this.autoplay();
    }, false);
}
       audio.play();
audio = new Audio(‘asound.ogg');
audio.addEventListener(‘loop’, function() {
    this.currentTime = 1;
    this.autoplay();
}, true);
audio.play();
       All of the above
Which of the following methods or properties control how lines are drawn in line style?
Note: There may be more than one right answer.
       CanvasRenderingContext2D.setLineDash()
       CanvasRenderingContext2D.lineStyle
       CanvasRenderingContext2D.miterLimit
       CanvasRenderingContext2D.lineDashOffset
       CanvasRenderingContext2D.lineDrawDash
RenderingContext is a helper type representing any of the following rendering contexts?
Note: There may be more than one right answer.
       WebGL2RenderingContext
       WebGLRenderingContext
       CanvasRenderingContext2D
       WebGLRenderingContext2D
The following core attributes that can be used on the majority of HTML elements?
Note: There may be more than one right answer.
       Class
       Id
       Title
       Style
       None of the above
Which of the following are Basic animation steps you need to take the draw a frame?
Note: There may be more than one right answer.
       Restore the canvas state
       Save the canvas state
       Load the canvas
       Draw animated shapes
       All of the above
Text styles, The following properties control how text is laid out?
Note: There may be more than one right answer.
       CanvasRenderingContext2D.move
       CanvasRenderingContext2D.textAlign
       CanvasRenderingContext2D.lineDraw
       CanvasRenderingContext2D.font
       CanvasRenderingContext2D.textBaseline
Controlling the position of elements,  ___  positions the element in relation to its containing element?
       Normal
       Relative
       Absolute
       None
In drawing text, the canvas rendering context provides the following methods to render the text?
Note: There may be more than one right answer.
       fillText(text, x, y [, maxWidth])
       fillText(text, x, y {maxWidth})
       strokeText(text, x, y {maxWidth})
       strokeText(text, x, y [, maxWidth])
Which following different methods can you use to set colors in your web page? (choose all that apply)
Note: There may be more than one right answer.
       Color digit
       Color names
       Hex codes
       Color decimal
       Percentage values
In drawing rectangles the following methods  immediately draw rectangles to the bitmap? (choose all that apply)
Note: There may be more than one right answer.
       CanvasRenderingContext2D.strokeRect()
       CanvasContext2D.strokeRect()
       CanvasRenderingContext2D.clearRect()
       CanvasContext2D.fillRect()
       CanvasRenderingContext2D.fillRect()
Which code will play an audio in a loop?
       audio = new Audio(‘asound.ogg');
audio.addEventListener('ended', function() {
    this.currentTime = 0;
    this.play();
}, false);
audio.play();

       audio = new Audio('someSound.ogg');
if (typeof audio.loop == 'boolean')
{
    audio.loop = true;
}
else
{
    audio.addEventListener(‘loop’, function() {
        this.currentTime = 1;
        this.autoplay();
    }, false);
}
audio.play();

       audio = new Audio(‘asound.ogg');
audio.addEventListener(‘loop’, function() {
    this.currentTime = 1;
    this.autoplay();
}, true);
audio.play();

       All of the above
In using a playlist with video or audio, which of following code snippets will load the next clip in the onend event?
var nextVideo = "path/of/next/video.mp4";
var videoPlayer = document.getElementById('videoPlayer');
videoPlayer.onended = function(){
    videoPlayer.src = nextVideo;
}
</script>
      
var nextVideo = "path/of/next/video.mp4";
var videoPlayer = document.getElementById('videoPlayer');
videoPlayer.onend = function(){
    videoPlayer.src = nextVideo;
}
</script>

      
var nextVideo = "path/of/next/video.mp4";
var videoPlayer = document.getElementById('videoPlayer');
videoPlayer.onend = function(){
    videoPlayer.src = nextVideo;
}
</script>
  autoplay autobuffer controls />

      
var videoPlayer = document.getElementById('videoPlayer');
videoPlayer.onend = function(){
    videoPlayer.src = nextVideo;
}
</script>
<video id="videoPlayer" src="/path/of/current/video.mp4" autoplay autobuffer controls />
What is the purpose of the <q> element in HTML5?
        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 are suitable uses for the nav element?
Note: There may be more than one right answer.
       For groups of controls (a, input, button)
       For groups of internal links (a elements)
       Changing the content of an Ajax page
       Defining context menus and toolbars
In HTML5, which of the following is not a valid value for the type attribute when used with the <command> tag shown below?
<command type="?">Click Me!</command>
       button
       command
       checkbox
       radio
 Which event is fired when an element loses its focus in an HTML5 document?
       onfocus
       onload
       onblur
       onselect
Which of the following are true regarding the <keygen> tag in HTML5?
       The tag specifies a key-pair generator field used for forms.
       The tag generates a public/private key pair and then creates a certificate request. This certificate request will be sent to a Certificate Authority (CA), which then creates a certificate and sends it back to the browser.
       The tag generates random passwords when the user requests for a password reset.
       The tag is deprecated in HTML5.
Which of the following is true while coding HTML5 in visual studio?
       Visual studio has built in tag support and validation for HTML5
       Visual Web Developer tools can be used to write HTML5 code and Validation
       Visual studio provides a plugin for HTML5 Intellisense
       HTML tags are not supported in visual studio.
Which of the following are valid values for the contenteditable attribute of the <figure> element in HTML 5.0?
       true
       false
       0
       1
Which media event is triggered when there is an error in fetching media data in HTML5?
       onstalled
       onwaiting
       onsuspend
       oninvalid
Which of the following events is not supported in HTML5?
        oninput
        oninvalid
        ondrop
        onreset
The following link is placed on an HTML webpage:
<a href="http://msdn.com/" target="_blank"> MSDN </a>
What can be inferred from it?
       It will open the site msdn.com in the same window.
       It will open the site msdn.com in a new window.
       It will open the site msdn.com in a frame below.
       It will not be clickable as it is not formed correctly.
Which of the following is not an attribute of the <meta> element in HTML5?
        charset
        content
        http-equiv
        scheme
Which of the following attributes gets hidden when the user clicks on the element that it modifies? (Eg. hint text inside the fields of web forms)
       autocomplete
       autofocus
       placeholder
       formnovalidate
What is the role of the <dfn> element in HTML5?
       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 media event will be fired when a media resource element suddenly becomes empty?
       onerror
       onended
       onloadeddata
       onemptied
Choose the valid methods for navigating to a fragment identifier.
Note: There may be more than one right answer.
       Parse the URL, and let fragid be the component of the URL.
       If fragid is the empty string, then the indicated part of the document is the top of the document.
       If there is an element in the DOM that has an ID exactly equal to fragid, then the first such element in tree order is the indicated part of the document; stop the algorithm here.
       If there is an a element in the DOM that has a name attribute whose value is smilar to fragid, then the first such element in tree order is the indicated part of the document; stop the algorithm here.
Which of the following is an invalid value for the type attribute of a command tag?
       checkbox
       radio
       command
       text
Which of the following is not a valid syntax for the <link> element in HTML5?
        <link rel="icon" href="/abc.jpg" sizes="16x16">
        <link rev="stylesheet" href="/abc.css" type="text/css" target="_parent">
        <link rel="alternate" type="application/pdf" hreflang="fr" href="/manual-fr">
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 webmaster#xcompany.com?
       <a href="mailto:webmaster#xcompany.com">webmaster</a>
       <a href="/webmaster#xcompany.com">webmaster</a>
       <a http="mail:webmaster#xcompany.com">webmaster</a>
       <mail http="send:webmaster#xcompany.com">webmaster</mail>
What is the proper syntax for a line break tag as W3C specs defines?
       <br>
       <br/>
       <br />
       All of these.
Which of the following are valid ways to associate custom data with an HTML5 element?
Note: There may be more than one right answer.
       <tr class="foo" data-id-type="4">
       <tr class="foo" id-type="4">
       <tr class="foo" data-id_type="4">
       All of the above.
Which of the following <section> elements have the correct attribute assignment as per HTML5?
Note: There may be more than one right answer.
       <section id="example">...</section id="example">  
        <section id="example">...</section id="example2">  
       <section id="EXAMPLE">...</section>
       <section id="Example">...</section>
       <section id="example">...</section>
Which of the following methods are valid for navigating to a fragment identifier?
Note: There may be more than one right answer.
       <a name="foo">bar</a>
       <a id="foo">bar</a>
       <div id="foo">bar</div>
       <div class="foo">bar</div>

 HTML5 Test Answers часть 2 HTML5 Test Answers часть 3

HTML5 Тест Upwork 2019