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

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

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

  1. <body>

  2. <head>

  3. <title>

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

The `` element is used to define the main content of a web page. It contains all the elements that are visible to the user, such as text, images, and links.

Multiple choice

Which CSS property is used to set 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 is used to set the background color of an element. It can be set to a color name, a hexadecimal color code, or an RGB color value.

Multiple choice

Which HTML element is used to create a link to another web page?

  1. <a>

  2. <link>

  3. <script>

  4. <img>

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

The <a> element is used to create a link to another web page. It has a href attribute that specifies the URL of the web page to link to.

Multiple choice

Which CSS property is used to set the font of an element?

  1. font-family

  2. font-size

  3. font-weight

  4. font-style

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

The font-family property is used to set the font of an element. It can be set to a font name, a generic font family name, or a system font name.

Multiple choice

Which HTML element is used to create a heading?

  1. <h1>

  2. <h2>

  3. <h3>

  4. <h4>

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

The <h1> element is used to create a heading. It is the most important heading element and should be used for the main title of a web page.

Multiple choice

Which international standard provides guidelines for web accessibility?

  1. ISO 9241-11

  2. WCAG 2.0

  3. IEEE 1074-1995

  4. ANSI/HFES 100-2007

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

WCAG 2.0 (Web Content Accessibility Guidelines) is an international standard that provides guidelines for making web content accessible to people with disabilities.

Multiple choice

What is the syntax for using the *ngIf directive in Angular?

  1. <div *ngIf="condition">My Element

  2. <div [ngIf]="condition">My Element

  3. <div ngIf="condition">My Element

  4. None of the above

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

To use the *ngIf directive in Angular, you specify the condition that you want to evaluate in the *ngIf attribute. If the condition is true, the element will be displayed. If the condition is false, the element will be hidden.