Introduction to Computing MCQs with Answers
Practice important Introduction to Computing MCQs with answers and explanations.
Chapter: 72
Q1041:
Which HTML element is used to define a section of a webpage?
A. <section>
B. <div>
C. <article>
D. <span>
Correct Answer:
A
Chapter: 72
Q1042:
How do you create a checkbox in HTML?
A. <input type="text">
B. <input type="radio">
C. <input type="checkbox">
D. <check>
Correct Answer:
C
Chapter: 72
Q1043:
Which HTML tag is used to add a comment in the source code?
A. <!-- comment -->
B. // comment
C. /* comment */
D. <!-- comment -->
Correct Answer:
A
Chapter: 72
Q1044:
What is the correct HTML tag for inserting a horizontal rule?
A. <rule>
B. <hr>
C. <line>
D. <separator>
Correct Answer:
B
Chapter: 75
Q1045:
What does XML stand for?
A. Extensible Markup Language
B. Extra Markup Language
C. Extended Markup Language
D. External Markup Language
Correct Answer:
A
Chapter: 75
Q1046:
What is the purpose of XML?
A. To style documents
B. To define document structure
C. To create dynamic content
D. To link documents
Correct Answer:
B
Chapter: 75
Q1047:
Which tag is used to define the root element in an XML document?
A. <root>
B. <document>
C. <xml>
D. <element>
Correct Answer:
C
Chapter: 75
Q1048:
How do you declare an XML document?
A. <?xml version="1.0"?>
B. <!DOCTYPE xml>
C. <xml declaration>
D. <?xml declaration?>
Correct Answer:
A
Chapter: 75
Q1049:
What is an XML element?
A. A piece of text
B. A container for data
C. A styling instruction
D. A link to another document
Correct Answer:
B
Chapter: 75
Q1050:
Which attribute is used to specify the type of XML document?
A. type
B. version
C. encoding
D. xmlns
Correct Answer:
B
Chapter: 75
Q1051:
How do you create a comment in XML?
A. <!-- comment -->
B. /* comment */
C. // comment
D. ** comment **
Correct Answer:
A
Chapter: 75
Q1052:
What does the xmlns attribute define in XML?
A. The XML version
B. The document encoding
C. The XML namespace
D. The document type
Correct Answer:
C
Chapter: 75
Q1053:
Which tag is used to enclose data in XML?
A. <data>
B. <item>
C. <value>
D. <content>
Correct Answer:
B
Chapter: 75
Q1054:
How do you include an attribute in an XML element?
A. <element attr="value">
B. <element value="attr">
C. <element attribute="value">
D. <element attr=value>
Correct Answer:
A
Chapter: 75
Q1055:
What is an XML schema used for?
A. To define document styling
B. To specify data structure
C. To link documents
D. To format text
Correct Answer:
B
Chapter: 75
Q1056:
How do you reference an external XML schema?
A. <schema src="file.xsd">
B. <?xml-schema file.xsd?>
C. <xsd:file>
D. <schema href="file.xsd">
Correct Answer:
D
Chapter: 75
Q1057:
Which XML element is used to create a list?
A. <list>
B. <item>
C. <array>
D. <sequence>
Correct Answer:
B
Chapter: 75
Q1058:
What does the term "well-formed" mean in XML?
A. Document has correct syntax
B. Document is valid according to schema
C. Document has no errors
D. Document is properly linked
Correct Answer:
A
Chapter: 75
Q1059:
What is the purpose of the <!DOCTYPE> declaration in XML?
A. To define the XML version
B. To specify the document type
C. To include external files
D. To add comments
Correct Answer:
B
Chapter: 75
Q1060:
How do you create a nested element in XML?
A. <parent><child></child></parent>
B. <child><parent></parent></child>
C. <parent child></parent>
D. <parent><child></parent>
Correct Answer:
A