Computer Knowledge
Markup and Web Languages
1,701 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
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.
Which HTML element is used to create a hyperlink?
A
Correct answer
Explanation
The <a> element is used to create a hyperlink, which allows users to navigate to another web page or section of the same page.
What is the purpose of using a meta description tag in HTML?
-
To provide a brief summary of the web page's content
-
To specify the author of the web page
-
To define the keywords related to the web page
-
To set the title of the web page
A
Correct answer
Explanation
The meta description tag is used to provide a brief summary of the web page's content, which is often displayed in search engine results and can influence click-through rates.
Which of the following is a web accessibility guideline that recommends providing alternative text for images?
-
WCAG 2.0
-
ARIA
-
WAI-ARIA
-
HTML5
A
Correct answer
Explanation
WCAG 2.0 is a web accessibility guideline that recommends providing alternative text for images. This allows people with visual impairments to understand the content of images.
Which of the following is a web accessibility guideline that recommends providing captions for videos?
-
WCAG 2.0
-
ARIA
-
WAI-ARIA
-
HTML5
A
Correct answer
Explanation
WCAG 2.0 is a web accessibility guideline that recommends providing captions for videos. This allows people with hearing impairments to access the content of videos.