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
Which metadata tag is used to specify the title of a podcast or audiobook episode?
A
Correct answer
Explanation
The Title metadata tag is used to specify the title of a podcast or audiobook episode, allowing it to be easily identified by listeners.
Which metadata tag is used to specify the author of an audiobook?
-
Author
-
Artist
-
Album
-
Genre
A
Correct answer
Explanation
The Author metadata tag is used to specify the author of an audiobook, allowing listeners to easily identify the writer of the book.
What is the purpose of the XMLHttpRequest object?
-
To send and receive HTTP requests
-
To parse JSON data
-
To create HTML elements
-
To handle events
A
Correct answer
Explanation
The XMLHttpRequest object is used to send and receive HTTP requests in JavaScript.
What are the different states of an XMLHttpRequest object?
-
UNSENT, OPENED, HEADERS_RECEIVED, LOADING, DONE
-
NEW, CONNECTED, SENDING, RECEIVING, CLOSED
-
REQUEST, RESPONSE, ERROR, ABORTED
-
PENDING, ACTIVE, COMPLETED
A
Correct answer
Explanation
The XMLHttpRequest object goes through different states during its lifetime: UNSENT, OPENED, HEADERS_RECEIVED, LOADING, DONE.
How can you handle the response of an XMLHttpRequest request?
-
Using the onload event
-
Using the onreadystatechange event
-
Using the onprogress event
-
All of the above
D
Correct answer
Explanation
You can handle the response of an XMLHttpRequest request using the onload, onreadystatechange, and onprogress events.
What is the purpose of the status property in XMLHttpRequest?
-
To indicate the status code of the response
-
To indicate the state of the request
-
To indicate the size of the response
-
To indicate the type of the response
A
Correct answer
Explanation
The status property in XMLHttpRequest indicates the status code of the response.
What does HTML stand for?
-
Hypertext Markup Language
-
Hypertext Modeling Language
-
Hypertext Machine Language
-
Hypertext Markup Link
A
Correct answer
Explanation
HTML stands for Hypertext Markup Language, a markup language used to create the structure and content of web pages.
Which HTML element is used to define the main content of a web page?
-
<head>
-
<body>
-
<title>
-
<html>
B
Correct answer
Explanation
The <body> element in HTML defines the main content of a web page, where the actual content is placed.
What is the correct syntax for creating a heading in HTML?
-
<h1>Heading</h1>
-
<heading>Heading</heading>
-
<h>Heading</h>
-
<head>Heading</head>
A
Correct answer
Explanation
In HTML, headings are created using the <h1> to <h6> elements, with <h1> being the most prominent heading.
Which HTML attribute is used to specify the link destination of an anchor (<a>) element?
A
Correct answer
Explanation
The 'href' attribute in the <a> element specifies the link destination, allowing users to navigate to another web page or section of the current page.
What is the purpose of the <meta> tag in HTML?
-
To define the title of the web page
-
To provide metadata about the web page
-
To create a link to another web page
-
To insert an image into the web page
B
Correct answer
Explanation
The <meta> tag in HTML is used to provide metadata about the web page, such as its title, description, keywords, and other information relevant to search engines and web crawlers.
Which HTML element is used to create a bulleted list?
A
Correct answer
Explanation
The <ul> element in HTML is used to create an unordered (bulleted) list, where each item is represented by a list item (<li>).
What is the correct syntax for creating a table in HTML?
-
<table><thead><tr><th>Heading</th></tr></thead><tbody><tr><td>Data</td></tr></tbody></table>
-
<table><tr><th>Heading</th></tr><tr><td>Data</td></tr></table>
-
<table><thead><tr><td>Heading</td></tr></thead><tbody><tr><th>Data</th></tr></tbody></table>
-
<table><tr><td>Heading</td></tr><tr><td>Data</td></tr></table>
A
Correct answer
Explanation
In HTML, a table is created using the <table> element, with <thead> for the table header, <tbody> for the table body, <tr> for table rows, and <th> and <td> for table headings and data cells respectively.
Which HTML element is used to create a form?
-
<form>
-
<input>
-
<button>
-
<label>
A
Correct answer
Explanation
The <form> element in HTML is used to create a form that allows users to input data, such as text, numbers, or selections, and submit it to a server for processing.
What is the purpose of the <style> tag in HTML?
-
To define the structure of the web page
-
To provide styling information for the web page
-
To create a link to an external style sheet
-
To insert an image into the web page
B
Correct answer
Explanation
The <style> tag in HTML is used to define styling information for the web page, allowing you to control the appearance of elements such as fonts, colors, and layouts.