A collection of 46 MCQs covering various web technology topics.

Tribhuvan University
Faculty of Humanities & Social Sciences
OFFICE OF THE DEAN
2024
Bachelor in Computer Applications

Paper detail Value
Course Web Technology
Code No. CACS205
Semester IIIrd
Full marks 60
Pass marks 24
Time 3 hours

Candidates are required to answer the questions in their own words as far as possible.

1. Which tag is used to create a hyperlink in HTML?

  • A. <a>
  • B. <link>
  • C. <href>
  • D. <hyperlink>

Answer: a) <a>

2. Which of the following explains the nature of cookies?

  • A. Non-volatile
  • B. Volatile
  • C. Intransient
  • D. Transient

Answer: d) Transient

3. When should you use a path along with the file name of a picture in an HTML <img> tag?

  • A. Path is optional and not necessary
  • B. Path is always necessary when inserting image
  • C. When the location of image file and HTML file are different
  • D. When image file and HTML file are in same location

Answer: c) When the location of image file and HTML file are different

4. Which CSS property will be used if we don't want to allow a floating div to the left side of the element?

  • A. margin
  • B. clear
  • C. float
  • D. padding

Answer: b) clear

5. The most prevalent way to materialize XML documents is to utilize:

  • A. SOAP
  • B. DTD
  • C. XSLT
  • D. EBXML

Answer: c) XSLT

6. Which one of the following is the very first task executed by a session-enabled page?

  • A. Delete the previous session
  • B. Check whether a valid session exists
  • C. Start a new session
  • D. Handle the session

Answer: b) Check whether a valid session exists

7. Which of the following XPath expressions selects the parent of the current node?

  • A. .
  • B. ..
  • C. /
  • D. //

Answer: b) ..

8. What is the purpose of the alt attribute in the <img> tag?

  • A. To set alignment
  • B. To provide alternative text
  • C. To resize image
  • D. None

Answer: b) To provide alternative text

9. What is the default display style of the <table> element in HTML?

  • A. block
  • B. inline
  • C. table
  • D. flex

Answer: c) table

10. Which of the following provide additional information about HTML elements?

  • A. Headings
  • B. Paragraphs
  • C. Attributes
  • D. Styles

Answer: c) Attributes

11. How can you define a variable in an XQuery query?

  • A. Using the "let" statement
  • B. Using the "declare" statement
  • C. Using the "var" statement
  • D. Using the "define" statement

Answer: a) Using the "let" statement

12. What is the purpose of a load balancer in a web application?

  • A. To distribute incoming traffic across multiple servers
  • B. To encrypt and decrypt data
  • C. To store and manage session data
  • D. To store and manage encrypted cookies

Answer: a) To distribute incoming traffic across multiple servers

13. How do you specify that an element is required in a DTD?

  • A. Using the #COMPULSORY keyword
  • B. Using the #MANDATORY keyword
  • C. Using the #REQUIRED keyword
  • D. Using the #NEEDED keyword

Answer: c) Using the #REQUIRED keyword

14. Which of the following statements is not true about XML Schema?

  • A. They are used to define the content and structure of data
  • B. They have their own syntax
  • C. They define a set of symbols and their relationships
  • D. They are not XML documents

Answer: d) They are not XML documents

15. What is the default lifetime for a cookie set?

  • A. 1 hour
  • B. 1 day
  • C. 1 week
  • D. The cookie will persist until the browser is closed

Answer: d) The cookie will persist until the browser is closed

16. How can you create a radio button input field in an HTML form?

  • A. <input type="radiofield">
  • B. <radiobutton>
  • C. <input type="radio">
  • D. <select type="radio">

Answer: c) <input type="radio">

17. Which of the following is not a paired tag?

  • A. <b>
  • B. <img>
  • C. <u>
  • D. <i>

Answer: b) <img>

18. ........ are serious errors that require attention but don't stop scripts from executing.

  • A. Fatal Errors
  • B. Notices
  • C. Warnings
  • D. Error Report Level

Answer: c) Warnings

19. How can you create a placeholder text in an input field in HTML5?

  • A. Using the "label" attribute
  • B. Using the "placeholder" attribute
  • C. Using the "title" attribute
  • D. Using the "alt" attribute

Answer: b) Using the "placeholder" attribute

20. By default, session is destroyed on:

  • A. Closing of browser
  • B. Logging out of system
  • C. Session can't be destroyed
  • D. Clearing all cookies from browser

Answer: a) Closing of browser

21. What is the default username for MySQL database?

  • A. admin
  • B. root
  • C. manager
  • D. There is no default username in MySQL

Answer: b) root

22. How do you create a variable in an XSLT stylesheet?

  • A. Using the <xsl:variable> element
  • B. Using the <xsl:set> element
  • C. Using the <xsl:let> element
  • D. Using the <xsl:define> element

Answer: a) Using the <xsl:variable> element

23. Which of the following is NOT an inline element?

  • A. <img>
  • B. <span>
  • C. <input>
  • D. None of the above

Answer: d) None of the above

24. How can you make an e-mail link?

  • A. <a href="mailto:xxx@yyy">
  • B. <mail href="xxx@yyy">
  • C. <mail>xxx@yyy</mail>
  • D. <a href="xxx@yyy">

Answer: a) <a href="mailto:xxx@yyy">

25. For an XML document to be valid:

  • A. Document needs to be well-formed also
  • B. Document need not be well-formed
  • C. Document needs to be well-formed & valid
  • D. Document validity has no relationship with well-formedness

Answer: c) Document needs to be well-formed & valid

26. W3C stands for:

  • A. World Wide Web Center
  • B. World Wide Web Company
  • C. World Wide Web Consortium
  • D. World Wide Web Certificate

Answer: c) World Wide Web Consortium

27. Which HTML element is used to define embedded CSS?

  • A. <css>
  • B. <style>
  • C. <script>
  • D. <link>

Answer: b) <style>

28. Which input type allows the user to upload a file in an HTML form?

  • A. input type="upload"
  • B. input type="submit"
  • C. input type="file"
  • D. input type="image"

Answer: c) input type="file"

29. Which tier handles business logic in a 3-tier architecture?

  • A. Client
  • B. Presentation
  • C. Server
  • D. Data

Answer: c) Server

30. What is the root element in an XML document?

  • A. <main>
  • B. <html>
  • C. Any single top-level element
  • D. <root>

Answer: c) Any single top-level element

31. XSL is:

  • A. An XML-based language to create style sheets
  • B. Extensible Solution Language
  • C. A language not used in XML
  • D. Extended Stylesheet Language

Answer: a) An XML-based language to create style sheets

32. CSS uses dot (.) for:

  • A. Element selector
  • B. Class selector
  • C. ID selector
  • D. Attribute selector

Answer: b) Class selector

33. Namespace in XML is used to:

  • A. Distinguish one XML vocabulary from another
  • B. Provide spaces into name
  • C. Act as a querying language
  • D. Make duplicate of XML validation

Answer: a) Distinguish one XML vocabulary from another

34. What are empty elements and is it valid?

  • A. No, there is no such term like empty elements
  • B. No, it is not valid to use Empty Element
  • C. Empty elements are elements with no data
  • D. none of the above are element with no data

Answer: c) Empty elements are elements with no data

35. In the three-tier architecture, the intermediate layer between database and client servers is classified as:

  • A. Functional server
  • B. Transaction server
  • C. Application server
  • D. Disk server

Answer: c) Application server

36. A cookie is often used to identify a:

  • A. User
  • B. Browser
  • C. Web page
  • D. Client

Answer: a) User

37. Server-side scripts are:

  • A. Visible to the end user
  • B. Invisible to the end user
  • C. Defined to the user
  • D. None

Answer: b) Invisible to the end user

38. Which of the following is use to read HTML page and render it?

  • A. Web server
  • B. Web browser
  • C. Web Matrix
  • D. Web cloud

Answer: b) Web browser

39. What is DOM?

  • A. Application program interface
  • B. Hierarchy of object in ASP
  • C. Convention for representing and interaction with object in html document
  • D. None of the mentioned

Answer: c) Convention for representing and interaction with object in html document

40. Which is the storage that allows the caching of web pages and their associated resources?

  • A. Offline web application
  • B. cookies
  • C. Web database
  • D. FileSystem API

Answer: a) Offline web application

41. Which XSLT element is used to iterate over a set of nodes?

  • A. <xsl:for-each>
  • B. <xsl:if>
  • C. <xsl:choose>
  • D. <xsl:apply-templates>

Answer: a) <xsl:for-each>

42. Which HTTP status code represents a "Not Found" error?

  • A. 200
  • B. 403
  • C. 404
  • D. 500

Answer: c) 404

43. Which of the following is used for user authentication in web servers?

  • A. Session
  • B. IP address
  • C. Cookie
  • D. All of the above

Answer: d) All of the above

44. Which of the following is not a type of screen frame in HTML?

  • A. iframe
  • B. noframe
  • C. frameset
  • D. uframe

Answer: d) uframe

45. What is the correct syntax for a self-closing tag in XML?

  • A. <tag/>
  • B. <tag>
  • C. <tag/>
  • D. <tag/>

Answer: a) <tag/>