Computer Knowledge
Markup and Web Languages
1,492 Questions
Test your understanding of HTML tags, XML structures, and web page creation technologies. The questions cover elements like CSS styling, parsing documents, and defining web attributes. This section is essential for candidates appearing for computer proficiency tests in various competitive exams.
HTML tags and attributesXML document parsingCSS styling levelsWeb page creation basicsBrowser compatibility
Markup and Web Languages Questions
What is the purpose of using JavaScript in web development?
-
To define the structure and layout of a web page
-
To add styling and formatting to a web page
-
To make a web page interactive
-
To optimize the performance of a web page
C
Correct answer
Explanation
JavaScript is primarily used to add interactivity and dynamic behavior to web pages, allowing users to interact with elements such as forms, buttons, and animations.
What is the recommended file format for publishing virtual tours on the web?
A
Correct answer
Explanation
HTML5 is the recommended file format for publishing virtual tours on the web, as it is widely supported by modern browsers and devices, providing a seamless and interactive experience for viewers.
Which online platform is known for its collaborative writing projects, allowing multiple authors to contribute to a single story or poem?
-
Wattpad
-
Goodreads
-
Scribd
-
Inkitt
A
Correct answer
Explanation
Wattpad is a popular online platform that enables collaborative writing projects, where multiple authors can contribute to the same story or poem.
Which language is commonly employed in web development within the Commonwealth of Nations?
C
Correct answer
Explanation
JavaScript is a popular language for web development in the Commonwealth of Nations due to its versatility, interactivity, and wide adoption.
In the interactive storytelling platform "Twine", authors create non-linear narratives where readers can navigate through different paths and endings. What is the name of the file format used in Twine?
-
JSON
-
HTML
-
XML
-
TwineScript
D
Correct answer
Explanation
TwineScript is the file format used in Twine to create interactive stories and games.
What is the most common markup language used to create web pages?
A
Correct answer
Explanation
HTML (Hypertext Markup Language) is the standard markup language for creating web pages.
What is the purpose of CSS?
-
To define the structure of a web page
-
To define the appearance of a web page
-
To define the behavior of a web page
-
To define the content of a web page
B
Correct answer
Explanation
CSS (Cascading Style Sheets) is used to define the appearance of web pages, including the layout, fonts, and colors.
What is the purpose of JavaScript?
-
To define the structure of a web page
-
To define the appearance of a web page
-
To define the behavior of a web page
-
To define the content of a web page
C
Correct answer
Explanation
JavaScript is a scripting language used to define the behavior of web pages, such as responding to user input, performing calculations, and creating dynamic content.
Which of the following is NOT a common type of cross-site scripting (XSS) vulnerability?
-
Reflected XSS
-
Stored XSS
-
DOM-based XSS
-
Self-XSS
D
Correct answer
Explanation
Self-XSS is not a common type of XSS vulnerability. It occurs when a script is executed by the victim's browser without any interaction from the attacker.
Which metadata element is typically used to describe the author of a digital resource?
-
Title
-
Creator
-
Subject
-
Description
B
Correct answer
Explanation
The 'Creator' metadata element is commonly used to identify the individual or organization responsible for creating the digital resource.
Which metadata standard is commonly used for describing cultural heritage resources?
-
Metadata Object Description Schema (MODS)
-
Resource Description Framework (RDF)
-
Extensible Markup Language (XML)
-
Hypertext Transfer Protocol (HTTP)
A
Correct answer
Explanation
The Metadata Object Description Schema (MODS) is a widely adopted standard for describing cultural heritage resources. It provides a comprehensive set of metadata elements to capture information about cultural objects, such as their title, creator, physical characteristics, and cultural context.
Which metadata element is typically used to describe the language of a digital resource?
-
Title
-
Creator
-
Language
-
Description
C
Correct answer
Explanation
The 'Language' metadata element is commonly used to identify the language in which a digital resource is created or expressed.
Which HTML element is used to define the main content of a web page?
-
<head>
-
<body>
-
<title>
-
<meta>
B
Correct answer
Explanation
The `` element contains the main content of a web page, including text, images, and other elements.
What is the correct syntax for a CSS rule that sets the font-size of an element?
-
font-size: 12px;
-
font: 12px;
-
size: 12px;
-
text-size: 12px;
A
Correct answer
Explanation
The font-size property is used to set the font size of an element, and the value can be specified in pixels (px), ems, or percentages.
What is the purpose of the document.querySelector() method in JavaScript?
-
To select the first element that matches a specified CSS selector
-
To select all elements that match a specified CSS selector
-
To create a new element in the DOM
-
To remove an element from the DOM
A
Correct answer
Explanation
The document.querySelector() method returns the first element that matches a specified CSS selector.