Anda di halaman 1dari 10

1516-Level L

Computing Final T2

Page 1 of 10

Sample Questions Exam


1.

Define cascading style.

2.

Write a code to change the color of every occurrence of list item to blue.

The extension given to Cascading Style Sheet filesis______and the tag that define a cascading
style sheet is __________.
3.

Why would we use style sheets?

4.

Which of the following is TRUE about styles?


I.
Cascading Style sheet and CSS are two different things and do not mean the same thing.
II.
A cascading style sheet is a collection of one or more cascading style codes. True

5.

What are the possible state of a link?

6.

Which hyperlink defines the links appearance when the mouse pointer over it but has not been
clicked.

7.

Which hyperlink specifies a links appearance after it has been clicked at least once.

8.

What is the main use of the style classes? Give an example.

9.

Write a code that define a new style class called paragraph, and specifying it attributes.

1516-Level L

Computing Final T2

Page 2 of 10

10.

Style classes can be used to manage which HTML tag attribute?

11.

What does the following HTML code do?


<td class= R2>red</td>

12.

What is a compiler?

13.

What does the term interpretation mean?

14.

When a webpage contains embedded JavaScript code, this code is converted into machinereadable form by ___________________________.

15.

What is the function of the <script> tag?

16.

JavaScript is converted into machine-readable form called _________________.


The rules of grammar for scripting languages is known as________________.

17.

Define each of the following terms:

18.

Methods:
Variable:
Keyword:
Write a JavaScript code to call a method.

19.

Which method allows you to insert a string of characters in the HTML text stream?
The document word is an _________________

1516-Level L

Computing Final T2

20.

Write a syntax for a conditional statement

21.

Give 3 examples of keywords in JavaScript.

22.

Give an example of the use of each of the below operators?


a)
b)
c)
d)

==
<
<=
!=

23.

In the code below, what are the words appName and navigator considered?
If (navigator.appName == Microsoft Internet Explorer)

24.

What is the function of the navigator.appName.

25.

What is the purpose of the alert method?

26.

All JavaScript statement usually ends with the ________________ character.

27.

What is the status line? Give an example

Page 3 of 10

1516-Level L

28.

Computing Final T2

Use the following JavaScript code to answer the questions below:


if (a < 10)
{
document.write(less than);
}
else
{
document.write(garter than);
}
a)
b)
c)
d)

10 is the ____________
The sign < is the ________________
The above JS statement is called _________________.
What happens if the condition is false?

29. Use the following part of the web page to answer the 5 questions below:

Write a statement to create the control shown in Part A?

Write a statement to create the control shown in Part B?

Write a statement to create the control shown in Part C?

Write a statement to create the control shown in Part D?

Write a statement to create the control shown in Part E?

Page 4 of 10

1516-Level L

Computing Final T2

Page 5 of 10

30. What is the use of a textbox?

31. What is a Radio button?

32. What is a check box?

33. Which of the following tags is used for data input?


<data_form>
<data>
<form>

34. A(n)_ ________________ is a series of hyperlinks on a webpage or in a frame.


35. When should a nested framesets tag be used?

36. The______________________ shows where one frame ends and another frame begins.
37. Write a code to change the thickness of the frame separator.
38. Write a tag to change the font of text in a paragraph to Times New Roman.

39. Write a tag that changes the font size of a text.

40. What is the use of the <img> tag?

1516-Level L

Computing Final T2

Page 6 of 10

Sample Answers Exam


1.

Define cascading style.


It is a collection of one or more attributes that can be specified once within the header of a
web page and then applied to many instances of a particular tag.

2.

Write a code to change the color of every occurrence of list item to blue.
<style type= text/css>
li { color: blue }
</style>
The extension given to Cascading Style Sheet filesis_.css_ and the tag that define a cascading style
sheet is _<style>_.

3.

Why would we use style sheets?


To keep all the style definitions in one place where they can be easily found
To simplify the header section of HTML documents

4.

Which of the following is TRUE about styles?


III.
Cascading Style sheet and CSS are two different things and do not mean the same thing.
IV.
A cascading style sheet is a collection of one or more cascading style codes. True

5.

What are the possible state of a link?


hover, normal, visited, and active

6.

Which hyperlink defines the links appearance when the mouse pointer over it but has not been
clicked.
hover

7.

Which hyperlink specifies a links appearance after it has been clicked at least once.
visited

8.

9.

What is the main use of the style classes? Give an example.


If you have several sections of text in a web page, and would like to apply a different set of
attributes to each section.
Example: .col { color: purple }
Write a code that define a new style class called paragraph, and specifying it attributes.
.paragraph {color:red; font-size:16; text-align: justify}

1516-Level L

Computing Final T2

Page 7 of 10

10.

Style classes can be used to manage which HTML tag attribute?


color, size, and alignment of text
background color of paragraphs
table border thickness, etc

11.

What does the following HTML code do?


<td class= R2>red</td>
It applies a style class called R2 to a cell in a table.

12.

What is a compiler?
It is software that converts programming languages to machine readable form.

13.

What does the term interpretation mean?


It is the term used to describe line-by-line conversion of a scripting language.

14.

When a webpage contains embedded JavaScript code, this code is converted into machinereadable form by _the web browser_.

15.

What is the function of the <script> tag?


It allows the web browser to detect embedded JavaScript code.

16.

JavaScript is converted into machine-readable form called _binary code_.


The rules of grammar for scripting languages is known as_program syntax_.

17.

18.

19.

Define each of the following terms:


Methods: Specialized functions within JavaScript objects
Variable: A user-defined name for a memory location whose value can change over time
Keyword: A word that is recognized as part of the language definition
Write a JavaScript code to call a method.
document.write(SABIS);

Which method allows you to insert a string of characters in the HTML text stream?
document.write( )
The document word is an _object_

1516-Level L
20.

Computing Final T2

Write a syntax for a conditional statement


if(<condition>)
{
statement 1;
statement 2;
}

if(<condition>)
{
statement1;
statement2;
}
else
{
statement3;
statement4;
}

21.

Give 3 examples of keywords in JavaScript.


else, if, and return

22.

Give an example of the use of each of the below operators?


e)
f)
g)
h)

==
<
<=
!=

a
a
a
a

== 25 to check if the variable a is equal to 25


< 20 to check if a is less than 20
<= 20 to check if a is less than or equal to 20
!= 10 to check if a is not equal to 10

23.

In the code below, what are the words appName and navigator considered?
If (navigator.appName == Microsoft Internet Explorer)
appName is a property
navigator is an object

24.

What is the function of the navigator.appName.


It holds the application name of the current web browser.

25.

What is the purpose of the alert method?


It displays a dialog box to notify the user of an event.

26.

All JavaScript statement usually ends with the _; semicolon_ character.

27.

What is the status line? Give an example


It is the bar at the bottom of the browser window that displays messages.
Example: window.status = Computing exam;

Page 8 of 10

1516-Level L
28.

Computing Final T2

Use the following JavaScript code to answer the questions below:


if (a < 10)
{
document.write(less than);
}
else
{
document.write(garter than);
}
e)
f)
g)
h)

10 is the _token_
The sign < is the _operator_
The above JS statement is called _conditional statement_.
What happens if the condition is false?
The else block will run

29. Use the following part of the web page to answer the 5 questions below:

Write a statement to create the control shown in Part A?


<input type="text" size = "30" />
Write a statement to create the control shown in Part B?
<input type = submit />
Write a statement to create the control shown in Part C?
<select> <option> one </option>
Write a statement to create the control shown in Part D?
<input type = "radio" name ="best"> red
Write a statement to create the control shown in Part E?
<input type ="checkbox" />English

Page 9 of 10

1516-Level L

Computing Final T2

Page 10 of 10

30. What is the use of a textbox?


It is a box in which the website visitor can enter information (as an address)
31. What is a Radio button?
It is circular, and allows the visitor to choose one option from a group of options.
32. What is a check box?
It is a box that allows the user to select more than one option from a group of
options.
33. Which of the following tags is used for data input?
<data_form>
<data>
<form>
Answer: <form>
34. A(n)_navigation bar_ is a series of hyperlinks on a webpage or in a frame.
35. When should a nested framesets tag be used?
When we need to have both, horizontal and vertical frames in the same page.
36. The_frame separators_ shows where one frame ends and another frame begins.
37. Write a code to change the thickness of the frame separator.
<frameset border = 5 .>
38. Write a tag to change the font of text in a paragraph to Times New Roman.
<p style = font-family: Times New Roman>
39. Write a tag that changes the font size of a text.
<p style = font-size: 175%>
40. What is the use of the <img> tag?
It is used to insert a picture in the webpage.

Anda mungkin juga menyukai