C777 A

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

It formats every element that is preceded by an element as teal text.

<style> h3~p { color: #008080; } </style>

a letter, the underscore character ( _ ) or the dollar sign ( $ ).

A JavaScript rule concerning variables states that the first character of a variable name must be:

you do not need to develop multiple versions of your scripts tailored for each browser

All browsers are DOM-compliant, which means that:

The rectangle

Although you can draw various shapes on the HTML5 Canvas, Canvas supports only one primitive shape. Which is it?

The background-size property

Before CSS3, background image size was largely dependent on the size of the original image. What CSS3 property can you use to resize a background image?

CSS3 text effect properties can be used to produce effects that previously required the use of images

CSS3 provides several new text effect properties designed to expand the formatting capabilities of Web page text. Which statement about the text effect properties is true?

JavaScript

Canvas is an HTML5 API that provides a place on a Web page (a "canvas") where you can display graphics, animation, video and games dynamically without the need for a plug-in. Which of the following should you use to create objects on a canvas?

A dialog box that displays: Hello World

Consider the following JavaScript code: function helloWorld(){ myVar = "Hello World"; } helloWorld(); alert(myVar); What will be the result of this code?

Test the code by running your script in multiple browsers and browser versions to see if it works as intended.

Code errors can be repaired, once you are aware of them. What should you do first after you have written your script code, and placed it in (or attached it to) an HTML file?

checking your code to verify that it complies with the syntax rules for your chosen standard.

Code validation is the process of

The sidebar will always appear 165 pixels wide and 662 pixels high.

Consider the following HTML and style sheet code: <!-- NAVIGATIONAL SIDEBAR -> <nav> <ul> <li><a href=http://www.habitat.org/how/about_us.aspx>Learn more</a></li> <li><a href=http://www.habitat.org/getinv/volunteer_programs.aspx>Volunteer</a></li> <li><a href=http://www.habitat.org/gov>Advocate</a></li> <li><a href=https://www.habitat.org/cd/giving/donate.aspx?r=r&link=1>Donate</a></li> </ul> </nav> nav { float: left; width: 165px; background: #fc3 url(navbg_04.gif) repeat-y top right; height: 662px; } What can you infer from the example code?

controls="controls"

Consider the following HTML code: <audio> <source src="audio.mp3" type="audio/mpeg" /> <source src="audio.wav" type="audio/wav" /> <source src="audio.ogg" type="audio/ogg" /> Your browser does not support the HTML5 audio element. </audio> Which attribute and value must you add to the <audio> element to incorporate default audio operations such as Play, Pause, Volume, etc.?

The poster attribute

Consider the following HTML code: <video width="360" height="270" controls="controls" poster="image.png"> <source src="video.mp4" type="video/mp4" /> <source src="video.webm" type="video/webm" /> <source src="video.ogg" type="video/ogg" /> Your browser does not support the HTML5 video element. </video> What attribute prevents the first frame of the video from displaying while the video is downloading?

The required attribute

Consider the following JavaScript code: function validateForm() { var x = document.forms["myForm"]["number"].value; if(!x) { alert("Please enter a phone number"); return false; } } The example code is the equivalent of which HTML5 attribute?

The value is: HelloWorld

Consider the following JavaScript code: function concatenate(txt1, txt2) { txt1 += " "; var myText; return txt1 + txt2; } var myText = concatenate("Hello","World"); What is the value of myText after execution?

) The pattern attribute

Consider the following JavaScript code: function validateForm() { var x = document.forms["myForm"]["email"].value; var atpos = x.indexOf("@"); var dotpos = x.lastIndexOf("."); if(atpos < 1 - ✅| dotpos < atpos+2 || dotpos + 2 >= x.length) { alert("Please enter a valid e-mail address"); return false; } } The example code is the equivalent of which HTML5 attribute?

A dialog box that displays: undefined

Consider the following JavaScript code: var myVar; function helloWorld(){ myVar = "Hello World"; } alert(myVar); What will be the result of this code?

A dialog box that displays: The total is 1.03

Consider the following JavaScript code: var subTotal = 1; var tax = 0.03; alert("The total is " + subTotal * (1 + tax)); What is the result of this code?

The result is: 1

Consider the following JavaScript expression: parseInt("1.5y"); What is the result of this expression?

return x * 2

Consider the following JavaScript function: function myFunction(x) { //your code here } Which code statement should be added to the function to return to the calling statement the value of x multiplied by 2?

return boldText

Consider the following code (line numbers added for reference): function makeBold(text) { var boldText = text.bold() //insert code here } What code statement must be inserted in Line 3 to return the text in bold to the calling statement?

A rule

Consider the following code from a CSS document: body {background-color: #008080; color: #FFFFFF;} This code is an example of what?

The search field will degrade to a standard text box

Consider the following code to create a search field: input type="search" name="search" What occurs if the input type of "search" is not supported by a browser?

First getAge, then showAge

Consider the following code: _script_ var age; function showAge() { getAge(); alert(age); } function getAge() { age = prompt("Please enter your age:","18"); } _/script_ _body onload="showAge();"_ In what order will the functions complete execution

The -webkit- prefix ensures that the CSS3 code that it precedes will render properly in Chrome, Safari and iOS browsers.

Consider the following code: div { -webkit-border-image: url(flowers.png) 80 40 round; } What function does the -webkit- prefix perform?

A key-pair generator field that creates a private key and a public key when the form is submitted

Consider the following code: form User name: input type="text" name="username" Encryption: keygen name="encryption" input type=submit /form What does the keygen element display?

4/1/2015

Consider the following code: form fieldset name="pattern_attribute" legend The Pattern Attribute /legend br Date: input type="text" pattern="\d{1,2}/\d{1,2}/\d{4}" br br button type="submit" formaction="http://ss1.ciwcertified.com/cgi-bin/process.pl" Submit Form /button /fieldset /form Which choice illustrates a valid entry for the Date field?

The value is: 0

Consider the following code: function counter(x) { x = x + 1; } var myVar = 0; counter(myVar); What is the value of myVar after execution?

The input element's list attribute

Consider the following code: input list="continents" name="continent" datalist id="continents" option value="North America" option value="South America" option value="Europe" option value="Asia" option value="Africa" option value="Australia" option value="Antarctica" /datalist Which attribute must you use to bind the input field to the datalist element?

Calling external JavaScript

Consider the following code: script src="newScript.js" This is an example of what?

The input field must be completed before form submission

Consider the following code: Your name: input type="text" name="name" required Which statement accurately describes this input field?

The string data type

Consider the following code: var birthYear = "1956"; What data type does the variable birthYear contain?

Conditional

Consider the following expression: "Good morning, " + "Sarah"; What type of expression does this code snippet represent?

27

Consider the following expression: (((8 - 2) * 6) / (6 - 2)) * 3 What is the result of this expression?

Assignment

Consider the following expression: apartmentNumber = 523; What type of expression does this code snippet represent?

You can resize both the height and width of the section element, including the globe background image.

Consider the following snippet of code: section { background-image: url(globe.png); background-repeat: no-repeat; Document shared on www.docsity.com Downloaded by: priest-niraj ([email protected]) background-size: contain; resize: both; overflow: auto; } What can you determine from this code?

A value

Consider the following statement: src="script.js" In programming terms, what is the text "script.js" called?

To save and reuse the result of a calculation performed by a script

For what can you use the HTML5 output element?

To add a caption for a group of items created by the fieldset element

For what can you use the legend element?

To add video controls such as the Play, Pause, Rewind and Volume controls

For what should you use the controls attribute of the element?

To select every instance of a specified element that is the last of its parent

For what would you use the element:last-of-type selector?

To select every instance of a specified element whose specified attribute begins with the specified value

For what would you use the element[attribute^=value] selector?

Border

For which element of the CSS Box Model can you specify the width, style and color attributes?

To create a drop-down list of options

For which purpose can you use the select element?

create apps for mobile devices

HTML5 APIs can be used to:

Test the Web forms thoroughly on various browsers and browser versions

How can you best ensure that the Web forms you develop using HTML5 and CSS3 render properly on various browsers?

By specifying a percentage from 0% to 100%, or by using the keywords "to" and "from"

How can you define the position of an animation using the @keyframes rule?

In CSS3, font libraries can be automatically downloaded from a Web server to the client computer.

How can you specify to include two or more different images in the background of your Web page?

If a browser does not support the input type to which you assigned a pattern attribute, the resulting text may still be required to match the pattern

How is the HTML5 pattern attribute helpful in overcoming HTML5 browser support issues?

You must use separate script statements to call the external file and embed a separate script

How should you embed JavaScript code in an HTML5 document to which you are also linking an external JavaScript file?


Set pelajaran terkait

Chapter 19 Workforce Engagement and Collective Action

View Set

Lecture 11 Opioids: Dependence, Overdoses, and Drug Interactions

View Set

Stroke and TBI from internship 1

View Set