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
What is the primary markup language used for creating web pages?
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.
Which organization is responsible for developing and maintaining the LegalXML standard?
-
The American Bar Association (ABA).
-
The International Legal Technology Association (ILTA).
-
The World Wide Web Consortium (W3C).
-
None of the above.
Correct answer
Explanation
The LegalXML Consortium is a non-profit organization dedicated to developing and maintaining the LegalXML standard.
Which of the following is NOT a type of cross-site scripting (XSS) attack?
-
Reflected XSS
-
Stored XSS
-
DOM-based XSS
-
CSRF
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.
Which of the following is NOT a type of security header?
-
Content-Security-Policy (CSP)
-
X-XSS-Protection
-
X-Frame-Options
-
Referrer-Policy
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.
What is the primary purpose of HTML in web development?
-
To define the structure and layout of a web page
-
To add style and visual elements to a web page
-
To enable interactivity and dynamic behavior on a web page
-
To handle data storage and retrieval on a web server
A
Correct answer
Explanation
HTML provides the basic structure and organization of a web page, including headings, paragraphs, lists, and links.
Which CSS property is used to specify the background color of an element?
-
background-color
-
color
-
background-image
-
background-position
A
Correct answer
Explanation
The background-color property sets the background color of an element.
What is the purpose of the `` tag in HTML?
-
To include JavaScript code in a web page
-
To define the structure and layout of a web page
-
To add style and visual elements to a web page
-
To handle data storage and retrieval on a web server
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.
Which of the following is not a valid HTML element?
D
Correct answer
Explanation
The `` element is not a valid HTML element. It is used to embed JavaScript code into an HTML document.
Which HTML element is used to define the main content of a web page?
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.
Which CSS property is used to set the background color of an element?
-
background-color
-
color
-
background-image
-
background-position
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.
Which HTML element is used to create a link to another web page?
-
<a>
-
<link>
-
<script>
-
<img>
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.
Which CSS property is used to set the font of an element?
-
font-family
-
font-size
-
font-weight
-
font-style
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.
Which HTML element is used to create a heading?
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.
Which international standard provides guidelines for web accessibility?
-
ISO 9241-11
-
WCAG 2.0
-
IEEE 1074-1995
-
ANSI/HFES 100-2007
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.
What is the syntax for using the *ngIf directive in Angular?
-
<div *ngIf="condition">My Element
-
<div [ngIf]="condition">My Element
-
<div ngIf="condition">My Element
-
None of the above
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.