Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 117
Q1321:
Which XML code snippet correctly defines a default namespace?
A. <table xmlns="http://www.xyz.com/table">
B. <table xmlns:default="http://www.xyz.com/table">
C. <table xmlns:table="http://www.xyz.com/table">
D. <table xmlns:namespace="http://www.xyz.com/table">
Correct Answer:
A
Chapter: 117
Q1322:
What is the main use of XSLT in relation to XML namespaces?
A. To transform XML documents into other formats
B. To define namespaces in XML
C. To handle XML parsing errors
D. To encode XML documents
Correct Answer:
A
Chapter: 117
Q1323:
Fill in the blank: The namespace URI is often used as a pointer to a ________ containing namespace information.
A. web page
B. database
C. local file
D. XML schema
Correct Answer:
A
Chapter: 117
Q1324:
In the example <h:table xmlns:h="http://www.fruits.com/table">, what does xmlns:h define?
A. The namespace for the prefix h
B. The default namespace
C. The attribute for the prefix h
D. The URI for the prefix h
Correct Answer:
A
Chapter: 117
Q1325:
What is the result of using the same element name in XML without namespaces?
A. No conflicts occur
B. Conflicts may occur
C. The XML document becomes invalid
D. The element names are automatically merged
Correct Answer:
B
Chapter: 117
Q1326:
Fill in the blank: To avoid name conflicts when mixing XML documents from different sources, it is best to use ________.
A. namespaces
B. similar names
C. different encodings
D. default values
Correct Answer:
A
Chapter: 118
Q1327:
What does DTD stand for in XML?
A. Document Type Definition
B. Data Type Document
C. Document Transfer Definition
D. Data Transfer Document
Correct Answer:
A
Chapter: 118
Q1328:
What is the purpose of a DTD in XML?
A. To define the structure of an XML document
B. To style XML documents
C. To store XML attributes
D. To encode XML documents
Correct Answer:
A
Chapter: 118
Q1329:
Fill in the blank: An XML document that follows the rules of a DTD is considered ________.
A. Valid
B. Well Formed
C. Invalid
D. Corrupted
Correct Answer:
A
Chapter: 118
Q1330:
In the example <!DOCTYPE note SYSTEM "Note.dtd">, what does "Note.dtd" specify?
A. The location of the DTD file
B. The XML version used
C. The encoding type
D. The namespace URI
Correct Answer:
A
Chapter: 118
Q1331:
Fill in the blank: A DTD can define special characters and character strings using ________.
A. Entity declarations
B. Attribute declarations
C. Element definitions
D. Namespace declarations
Correct Answer:
A
Chapter: 118
Q1332:
What does the <!ENTITY nbsp " "> declaration define?
A. A non-breaking space
B. A new paragraph
C. An entity for copyright symbol
D. A new line character
Correct Answer:
A
Chapter: 118
Q1333:
Fill in the blank: The purpose of using a DTD is to verify that the data from an unknown source is ________.
A. Valid
B. Invalid
C. Well Formed
D. Corrupted
Correct Answer:
A
Chapter: 118
Q1334:
Which XML declaration indicates the inclusion of an external DTD file?
A. <!DOCTYPE note SYSTEM "Note.dtd">
B. <!DOCTYPE note PUBLIC "Note.dtd">
C. <!ENTITY note SYSTEM "Note.dtd">
D. <!DOCTYPE note>
Correct Answer:
A
Chapter: 118
Q1335:
Fill in the blank: The <!ENTITY writer "Faisal Nisar"> declaration defines a ________ in the XML document.
A. Character string
B. Element type
C. Attribute name
D. Namespace URI
Correct Answer:
A
Chapter: 118
Q1336:
What is the result of an XML document that does not conform to its DTD?
A. It is considered invalid
B. It is still "Well Formed"
C. It will be automatically corrected
D. It will be considered valid
Correct Answer:
A
Chapter: 118
Q1337:
Fill in the blank: The <!DOCTYPE note [ part of the DTD declaration is used to define ________.
A. Internal entities
B. External stylesheets
C. XML namespaces
D. Document encoding
Correct Answer:
A
Chapter: 119
Q1338:
What does XML Schema describe?
A. The structure of an XML document
B. The styling of an XML document
C. The encoding of an XML document
D. The metadata of an XML document
Correct Answer:
A
Chapter: 119
Q1339:
Which XML Schema element is used to define a complex type?
A. <xs:complexType>
B. <xs:element>
C. <xs:schema>
D. <xs:sequence>
Correct Answer:
A
Chapter: 119
Q1340:
Fill in the blank: XML Schema is written in ________.
A. XML
B. HTML
C. JSON
D. YAML
Correct Answer:
A