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

Multiple choice

Which metadata tag is used to specify the title of a podcast or audiobook episode?

  1. Title

  2. Artist

  3. Album

  4. Genre

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

Which metadata tag is used to specify the author of an audiobook?

  1. Author

  2. Artist

  3. Album

  4. Genre

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

What is the purpose of the XMLHttpRequest object?

  1. To send and receive HTTP requests

  2. To parse JSON data

  3. To create HTML elements

  4. To handle events

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The XMLHttpRequest object is used to send and receive HTTP requests in JavaScript.

Multiple choice

What are the different states of an XMLHttpRequest object?

  1. UNSENT, OPENED, HEADERS_RECEIVED, LOADING, DONE

  2. NEW, CONNECTED, SENDING, RECEIVING, CLOSED

  3. REQUEST, RESPONSE, ERROR, ABORTED

  4. PENDING, ACTIVE, COMPLETED

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The XMLHttpRequest object goes through different states during its lifetime: UNSENT, OPENED, HEADERS_RECEIVED, LOADING, DONE.

Multiple choice

How can you handle the response of an XMLHttpRequest request?

  1. Using the onload event

  2. Using the onreadystatechange event

  3. Using the onprogress event

  4. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

You can handle the response of an XMLHttpRequest request using the onload, onreadystatechange, and onprogress events.

Multiple choice

What is the purpose of the status property in XMLHttpRequest?

  1. To indicate the status code of the response

  2. To indicate the state of the request

  3. To indicate the size of the response

  4. To indicate the type of the response

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The status property in XMLHttpRequest indicates the status code of the response.

Multiple choice

What does HTML stand for?

  1. Hypertext Markup Language

  2. Hypertext Modeling Language

  3. Hypertext Machine Language

  4. Hypertext Markup Link

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

HTML stands for Hypertext Markup Language, a markup language used to create the structure and content of web pages.

Multiple choice

Which HTML element is used to define the main content of a web page?

  1. <head>

  2. <body>

  3. <title>

  4. <html>

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The <body> element in HTML defines the main content of a web page, where the actual content is placed.

Multiple choice

What is the correct syntax for creating a heading in HTML?

  1. <h1>Heading</h1>

  2. <heading>Heading</heading>

  3. <h>Heading</h>

  4. <head>Heading</head>

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In HTML, headings are created using the <h1> to <h6> elements, with <h1> being the most prominent heading.

Multiple choice

Which HTML attribute is used to specify the link destination of an anchor (<a>) element?

  1. href

  2. src

  3. alt

  4. title

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

What is the purpose of the <meta> tag in HTML?

  1. To define the title of the web page

  2. To provide metadata about the web page

  3. To create a link to another web page

  4. To insert an image into the web page

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

Which HTML element is used to create a bulleted list?

  1. <ul>

  2. <ol>

  3. <li>

  4. <dl>

Reveal answer Fill a bubble to check yourself
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>).

Multiple choice

What is the correct syntax for creating a table in HTML?

  1. <table><thead><tr><th>Heading</th></tr></thead><tbody><tr><td>Data</td></tr></tbody></table>

  2. <table><tr><th>Heading</th></tr><tr><td>Data</td></tr></table>

  3. <table><thead><tr><td>Heading</td></tr></thead><tbody><tr><th>Data</th></tr></tbody></table>

  4. <table><tr><td>Heading</td></tr><tr><td>Data</td></tr></table>

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

Which HTML element is used to create a form?

  1. <form>

  2. <input>

  3. <button>

  4. <label>

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

What is the purpose of the <style> tag in HTML?

  1. To define the structure of the web page

  2. To provide styling information for the web page

  3. To create a link to an external style sheet

  4. To insert an image into the web page

Reveal answer Fill a bubble to check yourself
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.