You are on page 1of 2

Web System and Technologies II

Mid Term Exam

Name: ____________________________ Date: ______________

Part I. Multiple Choices (10 Marks)


Instruction: Read the question and encircle the best answer.

1. The HTML style attribute is used to add styles to 6. In this method, the style element is used inside
an element, such as: the <head> element of the document.
a. div, p, span a. Inside Style
b. h1, h2, to h6 b. Embedded Style
c. html, head, body c. External Style
d. color, font, size, and more d. head Style

2. Below are text-align properties, except: 7. In this method the <link> element is used to
a. left point to an external CSS file.
b. right a. link Style
c. inherit b. Embedded Style
d. top c. External Style
d. head Style
3. Below are correct ways of using Text Size
property, except: 8. Which one below is a class:
a. font-size: 20px; a. .this-is-a-class { color: #000;}
b. font-size: 20dp; b. -this-is-a-class { color: #000;}
c. font-size: 2rem; c. ,this-is-a-class { color: #000;}
d. font-size: 20vw; d. ^this-is-a-class { color: #000;}

4. Which is the correct way of using Text Color 9. JavaScript can access elements with a specific
property: class name with the use of this method
e. color: #000; a. getElementsByClass()
f. font-color: #000; b. getElementsByClassName()
g. text-color: #000; c. getElementsByNameClass()
h. t-color: #fff; d. getElementsByClasses()

5. In this method, the style attribute is used inside 10. JavaScript can access an element with a specific
the HTML start tag. id with the use of this method
a. Inside Style a. getElementById() 
b. Embedded Style b. getElementByIdName()
c. External Style c. getElementByNameId() 
d. Inline Style d. getElementByIds() 

Part II. True or False (10 Marks)


Direction: Write T or True if the statement is correct and F or False if the statement is wrong.
1. ______. The CSS text-align property defines the 7. ______. To create a class; write a period (.)
vertical text alignment for an HTML element: character, followed by a class name. Then,
2. ______. The CSS background-color property define the CSS properties within curly braces {}
defines the background color and text color for 8. ______. To define multiple classes, separate the
an HTML element. class names with a dash, e.g. <div class=" this-is-
3. ______. The CSS font-size property defines the a-class ">.
text size and element size for an HTML element. 9. ______. You can have more than one element
4. ______. In HTML, a color cannot be specified by with the same id in an HTML document.
using a color name: 10. ______. The syntax for id is: write a hash
5. ______. Multiple HTML elements can share the character (#), followed by an id name. Then,
same class. define the CSS properties within curly braces {}.
6. ______. Class Name can also be used by a
JavaScript to access and manipulate elements.

Part III. Enumeration (10 Marks)


Direction: Only provide the number of the requested answer.

1. Give at least 5 HTML Formatting Elements (e.g. 2.


<b>, <strong>): 3. Give at least 3 values that a color can be specified
1. (e.g., RGB)
2. 1.
3. 2.
4. 3.
5.
2. Two ways of attaching external style sheets
1.

Part IV. Puzzle (20 Marks)


Direction: Rearrange HTML Syntax to an appropriate format to obtain the desired results.

You might also like