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

Multiple choice

Which HTML element is used to create a hyperlink?

  1. <a>

  2. <p>

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

Multiple choice

Which JavaScript method is used to add an event listener to an element?

  1. addEventListener()

  2. attachEvent()

  3. onclick()

  4. onmouseover()

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

The addEventListener() method is used to add an event listener to an element, allowing you to specify the event type (such as 'click' or 'mouseover') and the function to be executed when the event occurs.

Multiple choice

What is the purpose of using a meta description tag in HTML?

  1. To provide a brief summary of the web page's content

  2. To specify the author of the web page

  3. To define the keywords related to the web page

  4. To set the title of the web page

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

Multiple choice

Which JavaScript method is used to remove an element from the DOM?

  1. removeChild()

  2. remove()

  3. delete()

  4. detach()

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

The removeChild() method is used to remove an element from the DOM, allowing you to dynamically remove elements from the web page.

Multiple choice

Which of the following is a web accessibility guideline that recommends providing alternative text for images?

  1. WCAG 2.0

  2. ARIA

  3. WAI-ARIA

  4. HTML5

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

Multiple choice

Which of the following is a web accessibility guideline that recommends providing captions for videos?

  1. WCAG 2.0

  2. ARIA

  3. WAI-ARIA

  4. HTML5

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

Multiple choice

What is the primary markup language used for creating web pages?

  1. HTML

  2. CSS

  3. JavaScript

  4. PHP

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

HTML (Hypertext Markup Language) is the primary markup language used for creating web pages. It defines the structure and content of a web page.

Multiple choice

Which organization is responsible for developing and maintaining the LegalXML standard?

  1. The American Bar Association (ABA).

  2. The International Legal Technology Association (ILTA).

  3. The World Wide Web Consortium (W3C).

  4. None of the above.

Reveal answer Fill a bubble to check yourself
Correct answer
Explanation

The LegalXML Consortium is a non-profit organization dedicated to developing and maintaining the LegalXML standard.

Multiple choice

Which of the following is NOT a type of cross-site scripting (XSS) attack?

  1. Reflected XSS

  2. Stored XSS

  3. DOM-based XSS

  4. CSRF

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

CSRF (Cross-Site Request Forgery) is a type of attack that tricks a user into submitting a request to a web application that they are authenticated to, without their knowledge or consent.

Multiple choice

Which of the following is NOT a type of security header?

  1. Content-Security-Policy (CSP)

  2. X-XSS-Protection

  3. X-Frame-Options

  4. Referrer-Policy

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

Referrer-Policy is not a security header. It is a header that controls how much information about the referrer is sent to the server.

Multiple choice

What is the primary purpose of HTML in web development?

  1. To define the structure and layout of a web page

  2. To add style and visual elements to a web page

  3. To enable interactivity and dynamic behavior on a web page

  4. To handle data storage and retrieval on a web server

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

HTML provides the basic structure and organization of a web page, including headings, paragraphs, lists, and links.

Multiple choice

Which CSS property is used to specify the background color of an element?

  1. background-color

  2. color

  3. background-image

  4. background-position

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

The background-color property sets the background color of an element.

Multiple choice

What is the purpose of the `` tag in HTML?

  1. To include JavaScript code in a web page

  2. To define the structure and layout of a web page

  3. To add style and visual elements to a web page

  4. To handle data storage and retrieval on a web server

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

The `` tag allows you to include JavaScript code in your HTML document, enabling dynamic behavior and interactivity on your web page.

Multiple choice

Which of the following is not a valid HTML element?

  1. <p>


  2. <script>

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

The `` element is not a valid HTML element. It is used to embed JavaScript code into an HTML document.

Multiple choice

What is the purpose of the fetch API in JavaScript?

  1. To send HTTP requests

  2. To receive HTTP responses

  3. To parse JSON data

  4. All of the above

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

The fetch API in JavaScript can be used to send HTTP requests, receive HTTP responses, and parse JSON data.