Practice Q&A Questions

pdf

School

Georgian College *

*We aren’t endorsed by this school

Course

COMP2068

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

6

Uploaded by DeaconInternet11208

Report
1. Which language is primarily used for structuring web content? a) CSS b) Python c) HTML d) JavaScript Answer: c) HTML 2. What does CSS stand for? a) Client Side Scripting b) Cascading Style Sheet c) Cascading Server Script d) Content Style Sheet Answer: b) Cascading Style Sheet 3. True or False: JavaScript is responsible for the look and feel of a website. Answer: False 4. Which HTML element is used for embedding images? a) <media> b) <src> c) <pic> d) <img> Answer: d) <img> 5. What type of layout uses percentages for widths? a) Fixed b) Liquid c) Static d) Absolute Answer: b) Liquid 6. True or False: A responsive design will adjust the page layout based on device characteristics. Answer: True 7. Which HTML tag is used to create hyperlinks? a) <link> b) <a> c) <href> d) <nav> Answer: b) <a>
8. Which HTML tag is used for creating a form? a) <input> b) <textarea> c) <submit> d) <form> Answer: d) <form> 9. True or False: <head> contains the content users see and interact with on a web page. Answer: False 10. The font-weight property in CSS affects what aspect of the text? a) Color b) Style c) Thickness d) Alignment Answer: c) Thickness 11. Which CSS property changes the background color of an element? a) color b) bg-color c) background d) background-color Answer: d) background-color 12. True or False: Media queries in CSS are used for integrating multimedia like videos and audio into websites. Answer: False 13. In JavaScript, which of the following is used to print something to the console? a) print() b) echo() c) console.print() d) console.log() Answer: d) console.log() 14. Which is NOT an input type in HTML forms? a) checkbox b) paragraph c) radio d) submit Answer: b) paragraph
15. True or False: The <body> tag in an HTML document is where metadata, like character set and viewport settings, are defined. Answer: False 16. In a fixed layout, the width of elements is primarily set using: a) percentages b) em units c) pixels d) viewport units Answer: c) pixels 17. Which CSS property is used to specify the space between characters in a text? a) spacing b) letter-space c) char-spacing d) letter-spacing Answer: d) letter-spacing 18. True or False: Inline styles in HTML override external CSS styles. Answer: True 19. To make an element disappear visually from the page using CSS, you would set its display property to: a) none b) hidden c) invisible d) transparent Answer: a) none 20. What is the default value of the position property in CSS? a) fixed b) relative c) absolute d) static Answer: d) static 21. True or False: CSS stands for "Client Side Stylesheet". Answer: False 22. Which element in HTML is used for creating dropdown selections?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
a) <dropdown> b) <choice> c) <list> d) <select> Answer: d) <select> 23. In JavaScript, what is the correct way to create a function named 'myFunction'? a) function = myFunction(){} b) function: myFunction(){} c) function myFunction(){} d) myFunction = function(){} Answer: c) function myFunction(){} 24. True or False: In HTML, the <a> tag can only link to external websites. Answer: False 25. What is the purpose of the viewport meta tag in HTML? a) To make the website viewable b) To set the initial scale and width of the webpage for mobile devices c) To define the character set of the webpage d) To create a viewing window for videos Answer: b) To set the initial scale and width of the webpage for mobile devices 26. Which CSS property can change the text color of an element? a) font-color b) text-color c) color d) text-style Answer: c) color 27. True or False: An inline CSS has the highest priority among other CSS styles. Answer: True 28. In JavaScript, which of the following is an event handler suitable for detecting when an element is clicked? a) onhover b) onclick c) onpress d) onhold Answer: b) onclick
29. Which HTML tag defines a paragraph? a) <par> b) <p> c) <text> d) <pg> Answer: b) <p> 30. What does the DOCTYPE declaration specify in an HTML document? a) The version of CSS to use b) The JavaScript version c) The version and type of HTML d) The character set of the document Answer: c) The version and type of HTML 31. True or False: The alt attribute in the <img> tag is optional and mainly for decorative purposes. Answer: False 32. What does the CSS float property do? a) Makes an element semi-transparent b) Allows elements to be positioned left or right with content flowing around them c) Causes the element to rise to the top of its parent container d) Animates the element to move in a floating motion Answer: b) Allows elements to be positioned left or right with content flowing around them 33. In JavaScript, how do you write a comment that spans multiple lines? a) // This is a comment // b) <!-- This is a comment --> c) /* This is a comment */ d) -- This is a comment -- Answer: c) /* This is a comment */ 34. True or False: <ul> in HTML stands for "Unordered List". Answer: True 35. Which CSS unit is relative to the font-size of the element? a) px b) vh c) em d) % Answer: c) em
36. What does the z-index property control in CSS? a) Horizontal alignment b) Font size c) Stacking order of elements d) Border thickness Answer: c) Stacking order of elements 37. True or False: A JavaScript file has the extension .javasc. Answer: False 38. Which HTML tag is used to define an internal style sheet? a) <script> b) <style> c) <css> d) <internal> Answer: b) <style> 39. Which of the following is NOT a valid HTML input type? a) text b) button c) image d) paragraph Answer: d) paragraph 40. True or False: Media queries are a feature of JavaScript used to adapt content based on user behavior. Answer: False
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help