IT2805

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

Domain Name Servers map symbolic com puter names to their host names

(False, to IP Address)

Show what the corrected code would output.

(if today were Friday) Today is not Sunday Today is not Monday Today is not Tuesday Today is not Wednesday Today is not Thursday Today is Friday Today is not Saturday

Name each of the 4 required elements of a CSS rule and very briefly state the purpose of each part

- Selector, identifies the HTML tag to be styled - Declaration, encapsulates Properties/values pairs - Property, identifies the style attribute to be styled - Value, specifies the value to set the Property to

Explain the effect that each error would cause when the script is run

-Quotes in array: will not run -Loop counter: Will miss the first day -assign in if condition: infinite loop -no + in output statement: will no run -today in else output: Always output Wednesday as the day

Write a CSS rule that configures a class called "company" in bold, serif font, and 1.25em in size.

.company { font-weight: bold; font-family: serif; sonf-size: 1.25em; }

B. Write the CSS Pseudo Class es needed (4 boxes) to set the background color for visited and unvisited links to "lightblue", and the background color for the mouse over and active link s states to "yellow". (8%

/* unvisited link */ a:link { background-color: lightblue; } /* visited link */ a:visited { background-color: lightblue; } /* mouse over link */ a:hover { background-color: yellow; } /* selected link */ a:active { background-color: yellow; }

How many alert boxes will the following loop produce? (2%) for ( var Index = 0; Index <= 2; ++Index ) alert( Index );

3

What is the correct HTML for making a text input field?

<input type="text">

Develop a web-form to collect the following information (4%): name of the student • his/her email address

<label for="name">Name</label> <i nput type="text" name="name" id="name"> <label for="email">E mail</label> <input type="email" name="email" id="

The syntax for adding a textfield of 3 rows, each of width 40 is:

<textarea rows="3" cols="40">blah blah</textarea>

Consider the table shown below. Which line of code would create the last row of the table

<tr><td colspan="2"></td></tr>

Explain the key differe nces between Canvas and SVG , no need to write more than 4 5 bullet points

In Canvas elements are drawn programmatically while in SVG are parts of the page's DOM In Canvas drawing is done with pixels while in SVG is done with vectors. In Canvas anima tions are not built in while in SVG animations are built in Canvas has high performance for pixel based drawing operations while SVG is based on standard XML syntax, which provides better accessibility

What does the following HTML code? (5%) <area shape="rect" coords="384,66,499,271" href="water.

It specify a rectangular area inside an image as a hotspot, when clicked, it links to water.html. The area's top left corner is (384,66) and the bottom right corner is (499, 271)

State an image file format best suited to presenting photographic images on the Web

JPEG

If you wanted to round the corners of a block element, which style property would you apply?

border-radius:

How do you display a border like this: (2%) The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1pixel?

border-width:10px 1px 5px 20px;

The ______________ part of the box (box model), is where text and images

Content

__________________ routing is a technique to select the best route according to the network conditions at the time of transmission.

Dynamic

The elements <div> and <span> have the following characteristics

Elements <span> and <div> define content to be inline or block-level

GET requests cannot be bookmarked

False

In an HTML form, the method attribute is used to specify the script fi le that processes the form data

False

XML elements cannot be empty

False

In a hierarchical structure, each page is linked with the pages that follow and precede it in an ordered chain

False this happens in a linear structure

In regards to the CSS box model, where is the margin property located?

Outside the box

State an image file format best suited to presenting non-photographic images on the Web

PNG

While working on a JavaScript project, which function would you use to send messages to users requesting for text input?

Prompt()

Briefly state TWO advantages of vector images over bitmapped images for displaying images on the Web

Scalable Editable

The purpose of ______________________ is to ensure the inte grity of network communication.

Transport Layer/TCP

In HTML5 <video> element you don't need to supply values for all attributes, eg. control, loop; these attributes are on when they are there and off in case they don't.

True

POST requests are never cached

True

Pseudo-class selects an element based on a state the element is in

True

This is a valid JSON. { "id": "name": "A green "price": "tags": ["home", " }

True

This a "well formed" XML document: <?xml version="1.0" encoding="UTF-8"?> <book1><isbn>1234567890</isbn><name>XML Master Basic >2006&lt;</name></book1>

True, it is well formed

<html> <head> <style> ... </style> </head> <body> <h1> Heading 1</h1> <h2> Heading 2.a</h2> <p> First paragraph. </p> <p> Second paragraph<b>first bold</b>and a <span>span with a<b>second bold</b></span>. </p> <h2> Heading 2.b</h2> <p> Third paragraph has a <b>third bold</b> also. </p> </body </html> Build (draw) the Document/HTML tree of the code above

document tree

Which of the following is the code for accessing the contents of an input box named userData on a form?

document.forms[0].userData.value

Write the CSS rules needed to produce the outcomeshown below. The lines "First paragraph" and "Third paragraph has a third boldtoo" shall be green (may not be visible on your question sheet in case of b/w print)

h2+p { color:green; }

In HTML tables, the number of columns is determined by

how many <td> elements are inserted within each row

FIKSE Select all valid XML tag names: [] <_Element1> [ ] <1Tag> [] <My. [ ] <#Elem&ent> [] <My Element_Name] [ ] <XmL>

[ X ] <_ [ ] <1Tag> [ X ] <My. [ ] <#Elem&ent> [ X ] <My Element_Name] [ ] <XmL>

How do you display hyperlinks without an underline?

a {text-decoration:none;}

If you'd like visited links to be green, unvisited links to be blue, and links that the mouse is over to be red, which CSS rules will you use?

a:link { color: blue } a:visited { color: green } a:hover { color: red }

Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

alt

Consider the following JavaScript statement: var myLinks =getElementsByTagName ("a"); var myLinks =getElementsByTagName ("a"); What is the What is the data type of the result?data type of the result?

an array

What is the correct JavaScript syntax to change the content of the HTML element below? (2%) <p id="demo">This is a demonstration.</p>

document.getElementById("demo").innerHTML = "Hello World!";

Write a JavaScript function to add rows to a table. <!DOCTYPE html> <html><head> <title>Insert row in a table - w3resource</title> </head><body> <table id="sampleTable" border="1"> <tr><td>Row1 cell1</td> <td>Row1 cell2</td></tr> <tr><td>Row2 cell1</td> <td>Row2 cell2</td></tr> </table><br> <input type="button" onclick="insert_Row()" value="Insert row"> </body></html>

function insert_Row() { var x=document.getElementById('sampleTable').insertRow(0); var y = x.insertCell(0); var z = x.insertCell(1); y.innerHTML="New Cell1"; z.innerHTML="New Cell2"; }

Write code for a JavaScript function that: (6% - 1.5% each) a. reads in two numbers from an HTML form b. determines which number is the largest c. outputs to screen which number is the largest (in the format "44 is larger than 22") and d. write an appropriate HTML form which will call this function

function largest(){ var numA = parseInt(document.myForm.numA.value); var numB = parseInt(document.myForm.numB.value); if (numA > numB){ document.write(numA + " is larger than "+numB); } else if (numA < numB){ document.write(numB + " is larger than "+numA); } else{ document.write("Both numbers are equal"); } } <form name="myForm" action=""> Enter first number <input type="text" name="numA"><br> Enter second number <input type="text" name="numB"><br> <input type="button" value="click" onclick=largest();> </form>

Which built-in HTML5 object is used to draw on the canvas?

getContext

Given a file structure in the figure below, if you are working on the source code of index.html, which of the following is the correct relative URL for lecture1.html?

lectures/lecture1.html

how to link a stylesheet

link rel="stylesheet" href="mystyle.css"

Write the CSS rules needed to produce the outcome shown below. The words "first bold" and "third bold" shall be green (may not be visible on your question sheet in case of b/w print)

p > b { color:green; } https://stackoverflow.com/questions/3225891/what-does-the-greater-than-sign-css-selector-mean

<p> Lorem ipsum dolor...</p> Write the CSS rules needed to (4%): 1. Change the font for the sentence to fantasy 2. Change its size to 24px. 3. Make the textbold 4. Make the textitalics

p { font-family: fantasy; font-size: 24px; font-weight: bold; font-style: italic; }

___________{ content: url(smiley.gif); } ____________{ content: url(smiley.gif); }

p::before{ content: url(smiley.gif); } p::after{ content: url(smiley.gif); }

<!DOCTYPE html> <html> <head> <style> ... </style> </head> <body> <p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't h ad the advantages that you've had.'</p> </body> </html> Set text color to "blue", and the text size to "xx large", for the first letter of the <p> element.

p::first letter { color: red; font size: xx large; }

<!DOCTYPE html> <html> <head> <style> ... </style> </head> <body> <p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't h ad the advantages that you've had.'</p> </body> </html> Write the CSS Pseudo Classes needed to (6% 2% each) a. Set text color to red, for the first line of the <p> element.

p::first line { color: red; }

What is the required attribute of the <video> element in HTML5, when the video is in a single format?

src

What is the output when you run the following programs: . . var i = 25; var j = "25"; var k = 2 + "5 var l = "2" + " (a) document.write (i == j); (b) document.write (i === j); (c) document.write (j == k); (d) document.write (j === k); (e) document.write (i == k); (f) document.write (i === k); (g) document.write (k == l); (h) document.write (k === l);

true false true true true false true true

If you want to control which element sits on the top (when elements you use the ___________________ property.

z index


Set pelajaran terkait

Mod 1 - Med Term - Directional & Movement Terms

View Set

Test Four - Probability Concepts

View Set