MocktestCOMP1589_SU2024
MocktestCOMP1589_SU2024
a. <css>
b. <js>
c. <script>
d. <style>
e. <ul>
f. <ol>
g. <li>
h. <item>
9. Which of the following Color Format is a CSS colors can also be defined using the keyword rgb,
followed by three numbers between 0 and 255, contained in parentheses and separated by commas, with
no spaces between them
a. RGB Color
b. RGBa Color
c. HSL Color
d. HSLa Color
a. let
b. var
c. Both are correct
d. None is correct
11. Which the foundation of the web, and it consisted of static text and images?
a. Web1.0
b. Web2.0
c. Web3.0
d. Web3
a. 17
b. 7
c. 10
d. 710
a. False
b. True
c. compilation error
d. runtime error
var quiz=[1,2,3];
var js=[6,7,8];
var result=quiz.concat(js);
document.writeln(result);
a. 1, 2, 3, 6, 7, 8
b. 123678
c. 1, 2, 3
d. Error
15. Small text files that are stored on a user’s computer or device by a website that they are visit and are
used to remember user preferences, login information, and other details that make browsing the web more
convenient are called
a. Session IDs
b. Cookies
c. Browser cache
d. Database records
16. What is the purpose of alt attributes when defining an image in HTML
a. Window.alert()
b. Window.alertBox()
c. Window.alertContent()
d. Window.alertMessage()
a. For loop
b. While loop
c. Both of the above
d. None of the above
a. //
b. /* and */
c. <* and *>
d. <! And !>
h1{text-decoration:underline}
23. What is essentially a box that wraps around every HTML element. It consists of: content, padding,
borders and margins
a. HTML Table
b. CSS Flexbox Layout
c. CSS Grid Layout
d. CSS Box Model
24. Which element in HTMl is used to draw the graphic, on the fly, via JS?
a. <graphic>
b. <design>
c. <canvas>
d. <animation>
a. demo
b. .demo
c. #demo
d. <demo>
26. What consists of two or more computers that are linked in order to share resources (such as printers
and CDs), exchange files, or allow electronic communications. The computers on a network may be
linked through cables, telephone lines, radio waves, satellites, or infrared light beams.
a. Social media
b. World Wide Web
c. Network
d. None of above
a. last_name
b. last.name
c. last-name
d. last name
28. What will be the output of the following JavaScript code?
<script>
const myArray = ['h', 'e', 'l', 'l', 'o'];
document.write(myArray[1]); document.write(myArray[2]);
</script>
a. he
b. el
c. ValueError
d. TypeError
29. Which HTML tag is used to display a web page within a web page.
a. <li>
b. <a>
c. <web>
d. <iframe>
30. Which HTML tag let a user select ONE of a limited number of choices.
a. <input type=”radio”>
b. <input type=”checkbox”>
c. <input type=”choice”>
d. <input type=”check”>
a. console.write()
b. console.output()
c. console.log()
d. console.writeHTML()
32. Which is the correct syntax to call an external JavaScript file in the current HTML document?
a. <script src="jsfile.js"></script>
b. <script href=" jsfile.js"></script>
c. <import src=" jsfile.js"></import>
d. <script link=" jsfile.js"></script>
a. <br>
b. <b>
c. <a>
d. <em>
a. background-color
b. text-color
c. color
d. font-color
38. Which of the following is the correct way to create a button that submits a form when clicked
a. <button type="submit">Submit</button>
b. <input type="button" value="Submit">
c. <button>Submit</button>
d. <a href="#" onclick="submitForm()">Submit</a>
a. TCP
b. HTTP
c. IP
d. Ethernet